Chrome扩展程序中未显示浏览器操作图标

时间:2014-01-13 05:50:34

标签: javascript json google-chrome-extension manifest

这是我的清单:

{
  "name": "Test",
  "description": "Appliation",
  "manifest_version": 2,
  "version": "0.1",
  "app": {
    "background": {
      "scripts": ["background.js"]
    }
  },
  "icons": { "16": "phone16.png", "256": "phone256.png" },
    "browser_action": {
   "default_title": "action description",
   "default_icon": "phone20.png"
}
}

但是在安装此扩展程序时,浏览器操作图标未显示。 有什么问题吗? 锄头我可以展示吗?

2 个答案:

答案 0 :(得分:0)

您宣布的是Chrome应用,而不是扩展程序:

"app": {
    ...
}

将上述块更改为:

"background": {
    "scripts": ["background.js"]
}

(即删除包装app属性,只需离开background。)

答案 1 :(得分:-1)

试试这个Manifest:

{
    "name": "Test",
    "version": "0.1",
    "manifest_version": 2,
    "description": "Appliation",
    "browser_action": {
        "default_title": "Test",
        "default_icon": "images/phone19.png",
    },
    "icons": { 
        "19": "images/phone19.png", 
    },
    "background": {
        "scripts": ["background.js"]
    }
}