发布到Google Web Store后无法使用jQuery安装Chrome扩展程序

时间:2015-02-28 06:45:11

标签: jquery google-chrome google-chrome-extension chrome-web-store

我写了一个使用jQuery的Chrome扩展程序。它在开发期间从本地解压缩文件夹运行时正常工作。但在我发布到Google网上应用店并尝试将其安装到Chrome后,我收到以下错误:

获取错误:包无效。详细信息:'无法为内容脚本加载javascript'jquery-2.1.1.min.js'。'

我已经尝试了jQuery 1.11.x和2.1.x并得到了完全相同的错误。我剥离了扩展试图隔离问题。 manifest.json文件如下所示:

{
    "name": "jQuery DOM",
    "version": "0.0.6",
    "manifest_version": 2,
    "description": "Manipulate the DOM when the page is done loading",
    "browser_action": {
        "name": "Manipulate DOM",
        "icons": ["images/edit48.png"],
        "default_icon": "images/edit48.png"
    },
    "content_scripts": [{
        "matches": ["http://*/*", "https://*/*"],
        "js": ["jquery-2.1.1.min.js", "content.js"],
        "run_at": "document_end"
    }]
}

,内容脚本非常基本:

$("body").append('Test');

我花了无数个小时谷歌搜索,试图弄清楚这一点没有成功。有一些帖子表明可以在扩展中包含jQuery,包括Google文档。但我无法解决它。有没有人遇到过这个问题并且能够解决它?任何帮助都会被挪用。

0 个答案:

没有答案
相关问题