Re-ordering Chrome's Context Menu.

1,617 views
Skip to first unread message

Lore

unread,
Jul 20, 2011, 12:47:21 PM7/20/11
to Chromium-extensions
Hi guys,

Does anyone know how to reorder items that already exist in the
context-menu? I would like to inject two new options.
One for links and one for images. But i need them to appear right
after two that already come by default when i right click on them.
I already have the two options working I just need to re-arrange their
position!!
This is my Extension so far --> https://chrome.google.com/webstore/detail/jcfanjdpjmmeikiapnmafdaffalemffm

Example when I right click an Image <img>:

Current Menu --> Save Image as...| Copy Image URL | Copy Image | Open
Image in New Tab.
Desired Menu --> Save Image as...| Copy Image URL | Copy Image Alt |
Copy Image | Open Image in New Tab.

Example when I right click an anchor Link <a>:

Current Menu --> Save Link as...| Copy Links address
Desired Menu --> Save Link as...| Copy Links address | Copy Links Text

Please any help would be greatly appreciated!

Thanks,
Lore

Arne Roomann-Kurrik

unread,
Jul 20, 2011, 2:55:56 PM7/20/11
to Lore, Chromium-extensions
The API doesn't support this.  In fact, Chrome will collapse multiple context menu entries into a submenu if your extension creates more than one context menu entry.  Because of this, I'm not sure if it would be possible to implement specific ordering like this, but you could follow these instructions to request a feature: http://code.google.com/chrome/extensions/faq.html#faq-fea-02

Regards,
~Arne



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Lore

unread,
Jul 20, 2011, 3:06:31 PM7/20/11
to Chromium-extensions
Thanks a lot Arne!

On Jul 20, 2:55 pm, Arne Roomann-Kurrik <kur...@chromium.org> wrote:
> The API doesn't support this.  In fact, Chrome will collapse multiple
> context menu entries into a submenu if your extension creates more than one
> context menu entry.  Because of this, I'm not sure if it would be possible
> to implement specific ordering like this, but you could follow these
> instructions to request a feature:http://code.google.com/chrome/extensions/faq.html#faq-fea-02
>
> Regards,
> ~Arne
>
>
>
>
>
>
>
> On Wed, Jul 20, 2011 at 9:47 AM, Lore <loren...@gmail.com> wrote:
> > Hi guys,
>
> > Does anyone know how to reorder items that already exist in the
> > context-menu? I would like to inject two new options.
> > One for links and one for images. But i need them to appear right
> > after two that already come by default when i right click on them.
> > I already have the two options working I just need to re-arrange their
> > position!!
> > This is my Extension so far -->
> >https://chrome.google.com/webstore/detail/jcfanjdpjmmeikiapnmafdaffal...
>
> > Example when I right click an Image <img>:
>
> > Current Menu --> Save Image as...| Copy Image URL | Copy Image | Open
> > Image in New Tab.
> > Desired Menu --> Save Image as...| Copy Image URL | Copy Image Alt |
> > Copy Image | Open Image in New Tab.
>
> > Example when I right click an anchor Link <a>:
>
> > Current Menu --> Save Link as...| Copy Links address
> > Desired Menu --> Save Link as...| Copy Links address | Copy Links Text
>
> > Please any help would be greatly appreciated!
>
> > Thanks,
> > Lore
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org.
Reply all
Reply to author
Forward
0 new messages