cwd*_*cwd 4 google-chrome contextmenu google-chrome-extension
我正在开发Google Chrome扩展程序,并设置了几个右键单击上下文菜单项.我看到语法中有一些东西可以添加一个菜单项,允许你选择一个父ID,但是我没有看到任何允许你选择将所有菜单项作为顶级项目的东西.
这是我的插件的示例,其中包含一个顶级菜单项,然后是几个子菜单项:
截屏2011-10-10 at 11.51.00 PM.png http://img571.imageshack.us/img571/6360/screenshot20111010at115.png
我想将它们带到顶层,因为我经常使用它们.这是我到目前为止的代码,但我无法弄清楚如何将它们全部拉到一个级别:
chrome.contextMenus.create({'title': 'Send URL to Quicksilver',
'contexts': ['all'],
'onclick': sendToQuicksilver});
chrome.contextMenus.create({'title': 'Send File to Quicksilver',
'contexts': ['all'],
'onclick': sendFileToQuicksilver});
chrome.contextMenus.create({'title': 'Quick Download',
'contexts': ['all'],
'onclick': quickDownload});
chrome.contextMenus.create({'title': 'Edit in Textmate',
'contexts': ['all'],
'onclick': editInTextmate});
chrome.contextMenus.create({'title': 'Open Project in Textmate',
'contexts': ['all'],
'onclick': editProjectInTextmate});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3372 次 |
| 最近记录: |