Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

Add new items to context menu

  • 3 отговора
  • 6 имат този проблем
  • 7 изгледи
  • Последен отговор от cor-el

more options

I would be able to customize the right-click / context menu. Not just disable built-in menu items, such as the Menu Editor add-on accomplishes. I want to be able to add my own menu entries.

For instance, I would like to add several Open With entries for other browsers and download managers. Or, a menu item that acted as a toggle for Javascript on/off. Etc etc.

Is this possible? If so, where can I find information on accomplishing this ... Google search failed me on finding any information.

Thanks

I would be able to customize the right-click / context menu. Not just disable built-in menu items, such as the Menu Editor add-on accomplishes. I want to be able to add my own menu entries. For instance, I would like to add several Open With entries for other browsers and download managers. Or, a menu item that acted as a toggle for Javascript on/off. Etc etc. Is this possible? If so, where can I find information on accomplishing this ... Google search failed me on finding any information. Thanks

Всички отговори (3)

more options
more options

Adding a menu item is just the beginning, you also need the behind the scenes coding that "links" that menu item the internal code of the Firefox core.

If you don't have any experience with CSS and JavaScript, you'll need to learn the basics.

After that you'll need to learn how those two things can applied to Firefox via an extension.
https://developer.mozilla.org/en-US/docs/Building_an_Extension


Or you can "dissect" Add-ons that already do similar to what you want to do, and then figure out how create a menu item to replace a toolbar button. For instance, Quick Java provides a toolbar "toggle" button.
https://addons.mozilla.org/en-US/firefox/addon/quickjava/

As far as opening other Browsers, this extension has that "context menu item".
https://addons.mozilla.org/en-US/firefox/addon/open-with/

As far as opening Downloads, see this AMO search.

more options

A lot of items in the context menu are context sensitive and only an extension can make sure that they only appear when needed, so you would have to create an extension that adds extra items to the right-click context menu only for specific elements.

You can also look at PrefBar to perform some actions easily.

This extension has a toolbar or can be added as toolbar button that opens a drop down list and allows you to define your own buttons, so doesn't work via the right-click context menu, but you can add keyboard shortcuts to toggle buttons.