0

I like the extension very much ,but the author don't update it ant more,so i want to fix it and using it by myself;but happended this error:

Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.

error shotpic

manifest.json:

{
"update_url": "https://clients2.google.com/service/update2/crx",
"description": "fixed One-Click Extensions Manager",
"name": "__MSG_extname__",
"version": "1.3.4.0",
"permissions": ["management", "storage"],
"browser_action":
{
    "default_icon": "icon32.png",
    "default_title": "__MSG_extname__",
    "default_popup": "popup.html"
},
"icons":
{
    "32": "icon32.png",
    "64": "icon64.png",
    "128": "icon128.png"
},
"content_scripts": [
{
    "js": ["zepto.min.js", "myscript.js"],
    "matches": ["*://*/*"],
    "run_at": "document_end"
}],
"default_locale": "zh_CN",
"manifest_version": 2

}

popup.html---the error point:

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>__MSG_extname__</title>
    <link rel="stylesheet" href="main.css">
</head>

<body>
    <ul id="extensions_list"></ul>
    <script src="myscript.js"></script>
    <script src="zepto.min.js"></script>
</body>

</html>

myscript.js---code too many and pasted on: https://pastebin.com/6NrsuzZA

so,what's wrong with the code? thanks !

Jim Green
  • 1
  • 1
  • 2

0 Answers0