I am working on a script, it's in AngularJS, but it could be jQuery or just JavaScript for the sake of this question. The script is inside a Content Editor Web Part. I want to provide configuration data to the script so it can be reused easily. In this particular case, I want to search and display the contents of a SharePoint List, but I don't want to hard-code the name of the List in the script.
When I was working with C#, I could easily modify the Properties pane. But for this assignment, I am working with script. I know the script is aware of of the URL, and I could pass the List name with a query string. But I am looking for a way to read a property from the Content Editor Web Part. Is that possible?
UPDATE: To make myself more clear, I want a reusable script I can put in ten different Web Parts. In each one of those Web Parts, I want to set a property of the Web Part that the script reads. So, WITHOUT rewriting the script, I configure it to read a different list in each Web Part.