Chrome扩展程序无法通过清单加载外部JavaScript [英] Chrome extension cannot load external javascript via manifest
本文介绍了Chrome扩展程序无法通过清单加载外部JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在研究可与Aviary API配合使用的Chrome扩展程序。我需要将Aviary Javascript添加到扩展。这是我的清单看起来像:
I'm working on a Chrome extension that works with the Aviary API. I need to add the Aviary Javascript to the extension. Here's what my manifest looks like:
"content_scripts": [ {
"js": ["http://feather.aviary.com/js/feather.js", "jquery-1.7.2.min.js", "chosen/chosen.jquery.js", "main.js" ],
"css": [ "assets/css/style.css" ],
}],
"permissions": [
"http://feather.aviary.com*",
"tabs",
"cookies"
]
但它一直抛出错误无法为内容脚本加载javascript'http://feather.aviary.com/js/feather.js'。 。我做错了什么?我一直在四处搜寻,但还没有找到解决方案。
But it keeps throwing the error "Could not load javascript 'http://feather.aviary.com/js/feather.js' for content script." . Am I doing anything wrong? I've been searching around but haven't found the solution.
推荐答案
您应该设置权限示例
"permissions": [
"http://*feather.aviary.com*", "webRequest",
"tabs"
]
这篇关于Chrome扩展程序无法通过清单加载外部JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文