【发布时间】:2015-05-21 05:02:43
【问题描述】:
我正在尝试从 chrome 示例扩展中安装 news reader
但即使不进行更改,它也无法正常工作。所以因为它需要清单 v2,所以我将 manifest_version: 2 添加到清单中,这给了我以下信息:
{
"name": "__MSG_name__",
"version": "1.1",
"manifest_version": 2,
"description": "__MSG_description__",
"icons": { "128": "news_icon.png" },
"browser_action": {
"default_title": "__MSG_default_title__",
"default_icon": "news_action.png",
"default_popup": "feed.html"
},
"permissions": [
"tabs",
"http://news.google.com/*",
"http://news.google.es/*"
],
"default_locale": "en"
}
但是我将如何更新它以修复以下错误:
feed.html:75 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
feed.html:103 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
feed.html:308 Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
【问题讨论】:
-
Lopk 在清单文档中。有权限。
标签: javascript html css google-chrome google-chrome-extension