我一直在尝试将我用jQuery/HTML写的一个简单程序移植到Firefox WebExtension中以便于发布。我遇到了如下错误:
Content Security Policy: The page’s settings blocked the loading of a resource at https://code.jquery.com/jquery-1.12.4.js (“script-src moz-extension://ef8f1295-1912-4912-ab2e-121053b6781a”).
我确定我只是没有正确编写 manifest.json 文件,但我真的不知道哪里错了:
{
"description": "Makes tasks from different underwriters uniform",
"manifest_version": 2,
"name": "Task Creator",
"version": ".5",
"permissions": [
"http://*/*", "tabs", "https://*/*"
],
"icons": {
"48": "icons/page-48.png"
},
"web_accessible_resources": [
"style/popUpStyle.css",
"script/popUpTask.js",
"script/logicTaskFiller.js",
"js/autosize.js",
"style/https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css",
"js/https://code.jquery.com/jquery-1.12.4.js",
"js/https://code.jquery.com/ui/1.12.1/jquery-ui.js"
],
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_icon": "icons/page-32.png"
}
}
js/https://code.jquery.com/jquery-1.12.4.js
是一个无效的文件路径。请使用js/jquery-1.12.4.js
并确保该文件存在。 - wOxxOm