I tried following Google's example: https://developer.chrome.com/extensions/options.html
I immediately encountered the problem of the button and body trying to execute functions, so I attached listeners instead. Then, it's telling me that the options page isn't allowed to execute JS.
Either I didn't properly understand how to do that, or Chrome's documentation is entirely wrong.
How do you use JS in there? Or: can you point me in the direction of a proper tutorial.
Check out this answer: Chrome tutorials - options page
"manifest_version": 2 forbids embedded scripts. Move all of the JavaScript to options.js and load it that way."
You can't use inline JS with manifest v2.0 that is required for new extensions. That was possible with manifest v1 but not now. You have to reference script file to page. This issue if present on all extension pages.
<script type="text/javascript">JS CODE</script>
Is not allowed anymore. Use this instead.
<script type="text/javascript" src="FILENAME.js"></script>
Take a look at google code docs - manifest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With