admin管理员组

文章数量:1327945

I've been playing around with a Chrome extension to enable me to right click on some selection of text and search that text on a site like Wikipedia or IMDb. I've managed to do this, but when I right click I would prefer to have the options listed one after the other. The way Chrome context menu extensions work by default cause any items to be gathered under one parent menu, as described here: .html

It does not specifically mention, however, that items absolutely cannot be listed individually. I haven't seen anything to suggest how it could be done though. I imagine creating separate extensions would work, but that's not an ideal solution.

Anybody have any ideas?

I've been playing around with a Chrome extension to enable me to right click on some selection of text and search that text on a site like Wikipedia or IMDb. I've managed to do this, but when I right click I would prefer to have the options listed one after the other. The way Chrome context menu extensions work by default cause any items to be gathered under one parent menu, as described here: http://code.google./chrome/extensions/contextMenus.html

It does not specifically mention, however, that items absolutely cannot be listed individually. I haven't seen anything to suggest how it could be done though. I imagine creating separate extensions would work, but that's not an ideal solution.

Anybody have any ideas?

Share Improve this question edited Jul 26, 2011 at 12:02 Martin asked Jul 26, 2011 at 10:29 MartinMartin 8401 gold badge7 silver badges25 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

There's no workaround than creating multiple extensions. It's clearly stated in the Google Chrome Developer page that it doesn't allow more than one item on the main context menu. If an extension tries to create more than one item, Chrome will collapse all of them into one single parent item.

本文标签: javascriptMultiple context menu entries for a chrome extensionStack Overflow