自定义Chrome扩展程序没有显示?

时间:2016-12-14 22:53:55

标签: google-chrome google-chrome-extension manifest.json

我为Chrome创建了一个自定义扩展程序并且安装成功并且效果很好,但我在右上角的选项菜单中看不到它?

我是否需要在manifest.json中包含其他内容,或者我需要编写更多需要显示的内容,因为我没有任何选项,只是将Tampermonkey脚本转换为扩展。

manifest.json

{
    "manifest_version": 2,
    "name": "Name..",
    "version": "0.7..",
    "description": "Desc..",
    "icons": {
        "128": "icon_128.png"
    },
    "author": "...",
    "content_scripts": [{
        "exclude_globs": [],
        "include_globs": ["*"],
        "js": ["jquery-3.1.1.min.js", "myScript.user.js"],
        "matches": ["https://example.com/*"],
        "run_at": "document_start"
    }],
    "converted_from_user_script": true
}

1 个答案:

答案 0 :(得分:0)

我在这里找到了答案:https://developer.chrome.com/extensions/browserAction

在我的情况下,我需要添加:

"browser_action": { 
    "default_icon": { 
        "128": "icon_128.png" 
    },
    "default_title": "title..."
}