简体   繁体   English

如何为我的上下文菜单项定义图标?

[英]How to define an icon for my context menu item?

How can I define an icon for a context menu item without declaring it in manifest.json?如何为上下文菜单项定义图标而不在 manifest.json 中声明它?

For example I want to offer the possibility to change the icon in the options.例如,我想提供更改选项中图标的可能性。

I thought I could use something like that, but nothing found in the Docs:我以为我可以使用类似的东西,但在文档中没有找到:

chrome.contextMenus.create( {'type': 'normal',
                             'title': 'CustomMenu',
                             'image': 'http://www.example.org/img.png'
                            }
                           );

From looking at the current documentation: http://code.google.com/chrome/extensions/contextMenus.html You cannot update the icon.通过查看当前文档: http://code.google.com/chrome/extensions/contextMenus.html您无法更新图标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM