谷歌浏览器扩展用户脚本图标

时间:2012-02-22 09:33:26

标签: javascript google-chrome google-chrome-extension

我在greasemonkey中安装了谷歌浏览器的用户脚本。我想更改Chrome>选项>扩展程序下显示的图标。我该怎么办?我试图改变" manifest.json"文件但无济于事。有人有想法吗?

以下是代码:

{
"content_scripts": [ {
  "exclude_globs": [  ],
  "include_globs": [ "http://someurl/" ],
  "js": [ "script.js" ],
  "matches": [ "http://*/*", "https://*/*" ],
  "run_at": "document_idle"
} ],
"converted_from_user_script": true,
"description": "",
"default-icon": "LogIn.png", <-- added this line here and placed png in same folder
"key": ".......=",
"name": "lmi",
"version": "1.0"
}

这是我更新的代码,但仍无效: - (

{
"browser_action": {
  "default_icon": "images/KeyLock48.png"
},
"content_scripts": [ {
  "exclude_globs": [  ],
  "include_globs": [ "http://someurl/" ],
  "js": [ "script.js" ],
  "matches": [ "http://*/*", "https://*/*" ],
  "run_at": "document_idle"
} ],
"converted_from_user_script": true,
"description": "",
"icons": {
  "128": "images/KeyLock128.png",
  "16": "images/KeyLock16.png",
  "32": "images/KeyLock32.png",
  "48": "images/KeyLock48.png"
},
"key": "....",
"name": "logmi",
"version": "1.0"   
}   

1 个答案:

答案 0 :(得分:2)

没有default_icon条目,只有icons entry

"icons": [
  "128": "LogIn.png"
],

如文档中所述,建议提供128x128,48x48和16x16图标。