I got the following error:
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' https://ajax.googleapis.com
".
I then read the documentation provided by Google and HTML5Rocks.
I made the following changes:
I removed an empty script tag from the HTML:
I changed the body tag from <body style="width: 400px"> to <body> and moved the css to an external file and added a link in the HTML.
I added the following to the manifest:
"web_accessible_resources": [
"images/icon.png",
"style/mystyles.css",
"script/popup.js"
I reran the extension and got the same error.
Long story short. I completely removed the Javascript file and the CSS file and got the same error.
I removed all references to JQuery except the following:
<html>
<head>
</head>
<body>
<div>Search Bookmarks: <input/></div>
</body>
</html>
As you can see this is bear-bones HTML.
I scripted the manifest down to:
{
"name": "My Bookmarks",
"version": "1.56",
"description": "A browser action with a popup dump of all bookmarks, including search, add, edit and delete.",
"permissions": [
"bookmarks"
],
"browser_action": {
"default_title": "My Bookmarks.",
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"manifest_version": 2,
}
The content security policy is the original.
I reran the extension and got the same error.
Finally, I removed the following script tag in the HTML.
The error disappeared.
The tool is incorrectly identifying this line as an inline script when it's not!
Please let me know, if I am wrong about this.
Thanks
Ken A. Scott