I am trying to make basically an element highlighter chrome extension. Workflow: - click on browser icon - click on the page - hightlight the element clicked
I am
Turns out I could not read the error properly until I saw it in here
Apparently manifest v2 does not allow you to have inline scripts, so you just need to
src="path_to_the_file.js"
In extension to @tak3r's answer and @Doug's comment:
Inline scripts need to be changed to external scripts.
Move:
<script>
chrome.tabs.executeScript(null,{
code:"document.body.style.backgroundColor='red'"
});
</script>
To a new file called main.js
and remove the <script></script>
tags
Include the following in the <head></head>
of your HTML
<script type="text/javascript" src="main.js"></script>