谷歌浏览器扩展用户脚本图标
我在 google chrome 中安装了来自 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"
}
I installed a userscript in google chrome from greasemonkey. I would like to change the icon which is shown under Chrome>Options>Extensions. How would I do that? I tried to change the "manifest.json" file but to no avail. Anybody has an idea?
Here is the code:
{
"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"
}
Here is my updated code but still not working :-(
{
"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"
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有
default_icon
条目,只有图标
entry:正如文档中提到的,建议提供128x128、48x48和16x16的图标。
There is no
default_icon
entry, only anicons
entry:As mentioned in the documentation, it is recommendable to provide 128x128, 48x48 and 16x16 icons.