0

I need to make a quick extension that runs a line of javascript whenever it is on a certain url, but I am have trouble figuring out how to do this. It isn't working, but I am not sure what is wrong and don't know how to troubleshoot this. Either a permission I am unaware of isn't set, the javascript is never executed or the javascript is just wrong! Thanks in advance for the help with this sort of naive question.

manifest:

{ "name": "name goes here", "version": "1.0", "description": "checks a box", "content_scripts": [ { "matches": [ "https://urlofpage.com" ], "js": ["script.js"] } ] } 

here is the script

<script type = "javascript"> //<!-- var checkbox = document.getElementById("checkboxid"); checkbox.checked =true; //--> </script> 

1 Answer 1

2

You should not have the HTML script tags in a .js file.

Sign up to request clarification or add additional context in comments.

1 Comment

And that was it. Thank you. It was so obvious I completely missed it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.