javascript 必须在 web_accessible_resources 清单键中列出,以便由扩展程序之外的页面加载。
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18180688/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
提问by Itay Roisman
I need help with problems loading my landing page. I keep getting this messages on my "inspector" in chrome -
我需要帮助解决加载着陆页的问题。我一直在 chrome 中的“检查员”上收到此消息-
Denying load of chrome-extension://bjgfdlplhmndoonmofmflcbiohgbkifn/js/lib/jquery-2.0.2.min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
Denying load of chrome-extension://bjgfdlplhmndoonmofmflcbiohgbkifn/js/lib/backbone-min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
GET chrome-extension://invalid/
拒绝加载 chrome-extension://bjgfdlplhmndoonmofmflcbiohgbkifn/js/lib/jquery-2.0.2.min.map。资源必须列在 web_accessible_resources 清单键中,以便由扩展之外的页面加载。
拒绝加载 chrome-extension://bjgfdlplhmndoonmofmflcbiohgbkifn/js/lib/backbone-min.map。资源必须列在 web_accessible_resources 清单键中,以便由扩展之外的页面加载。
获取 chrome-extension://invalid/
This is the link for my website http://www.itayroisman.com
这是我网站的链接 http://www.itayroisman.com
Please help me with this issue.
请帮我解决这个问题。
回答by Peter
The Hootsuite chrome extension doesn't seem to be compatible with the latest build of chrome. Go to tools>extensions and click Developer mode. The id numbers come up on each of your extensions and you can match them to the errors in Developer Tools
Hootsuite chrome 扩展似乎与最新版本的 chrome 不兼容。转到工具>扩展并单击开发人员模式。id 号出现在您的每个扩展程序上,您可以将它们与开发人员工具中的错误进行匹配
回答by user674158
I found another anwsermay be OK.
我发现另一个 anwser可能没问题。
Just remove this line from the top of jquery file
只需从 jquery 文件的顶部删除这一行
//@ sourceMappingURL=jquery-1.10.2.min.map If you check the source of Jquery 1.10.2, it has included source map line on the top. I hope you are not using Source Maps. For more details just check these links:
//@ sourceMappingURL=jquery-1.10.2.min.map 如果您查看Jquery 1.10.2 的源代码,它会在顶部包含源映射行。我希望你没有使用 Source Maps。有关更多详细信息,请查看以下链接:
http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found) Alternate approach
http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/jQuery 的 jquery-1.10.2.min.map 正在触发 404(未找到)替代方法
Download the source map file from jquery downloads page and put jquery-1.10.2.min.map in the extension directory. Download uncompressed source code as well and put in the extension directory. Basically you need three files [SourceMap, Compressed, Uncompressed]. Add these map file path and uncompressed file paths to web_accesible resources.
从 jquery 下载页面下载源地图文件并将 jquery-1.10.2.min.map 放在扩展目录中。下载未压缩的源代码并放入扩展目录。基本上你需要三个文件 [SourceMap, Compressed, Uncompressed]。将这些地图文件路径和未压缩文件路径添加到 web_accesssible 资源中。
回答by mikemaccana
I just had the same problem.
我只是遇到了同样的问题。
If you're not using the the sourcemap:
如果您不使用源映射:
Open your jquery.js, remove the following line fro mthe top of the file:
//@ sourceMappingURL=jquery-2.0.3.min.map
打开您的 jquery.js,从文件顶部删除以下行:
//@ sourceMappingURL=jquery-2.0.3.min.map
If you do want the sourcemap:
如果您确实想要源映射:
Download code.jquery.com/yourfilename (see the comment in your jquery file, mentioned above)
Add a line line
"web_accessible_resources": [ "js/jquery-2.0.3.min.map" ],To your manifest.json
Reload your extension.
下载 code.jquery.com/yourfilename(请参阅上面提到的 jquery 文件中的注释)
添加一行行
"web_accessible_resources": [ "js/jquery-2.0.3.min.map" ],到您的 manifest.json
重新加载您的扩展程序。
回答by Tomas Forslund
For me disabling: XPath Helper 1.0.13 in chrome://extensions/ solved the problem
对我来说禁用:chrome://extensions/ 中的 XPath Helper 1.0.13 解决了这个问题
回答by Lucio Paiva
For those who are developing a Chrome extension and are having this same problem, this answermay help you.
对于那些正在开发 Chrome 扩展程序并遇到同样问题的人,这个答案可能对您有所帮助。

