So I submitted my add-on and got the accepted email along with this comment At the next update, please remove the following from manifest.json: “content_security_policy”: “script-src ‘self’ https://www.google.com; object-src ‘self’”, I removed this without realising that I can’t load the external script that my add-on needs to function without that line. The script is called script.js and is located in the same directory as the index.html.
Is there another way that I can run the code that I need to without using the code that they asked me to take out?
Thanks for the reply
But to my knowledge you can’t execute a inside of a html document inside of a scirpt so I put it into a script.js file inside the actual add-on.
Why would you need the external source?
If the addon doesn’t work like that, or you need to interact with JavaScript in the target page, you can insert the code into the page by creating a ‘script’ element and set its content to your code and then append it into the page.
Oh okay, When I tested my extension in Google Chrome, anything inside the tag did not run. I assumed this was the same for Firefox. So I just put all my code in a tag inside the index.html document?