Sie sind hier: Startseite / How to edit Firefox's context menu

How to edit Firefox's context menu?

"How to change order in Firefox's context menu?"

"How to rearrange or remove menuitems from the main context menu?"

"Remove Unwanted Clutter from Firefox Right-Click Menu"

Those and a lot more topics about almost the same issues are spread all over the net because many users have been used to the way the context menu was for years. Then they suddenly got screwed over night. One half adores the change the other half hates it - nothing in between. Haters gonna hate.

The answer

Most of the sites on the interwebs regarding the points above answer with "Install the Menueditor" Add-on. And well, this extension will do its job pretty fine and lets you modify the context menu endlessly. But some people out there just don't want to blow up there little foxy with tons of Add-ons - one for this, two for that. Some out there just want to edit one, two, three lines in the source code to alter the order of "Open Link in New Window" and "Open Link in New Tab". Tell ya what, there's good news for ya. (At the moment) The answer for

"How to remove >Open Link in New Tab< from the context menu?"

Create a file called userChrome.css in the chrome folder inside your profile folder. If there's already such a file you can edit it. If you have a virgin installation the file does not exist, even the chrome folder does not exist so you have to create both first. Use one of the existing userChrome-example.css files. If you're done fill the following into userChrome.css in order to remove "Open Link/Frame in New Tab" from context menu:
/* Never show "Open in New Tab" when right clicking */
#context-openlinkintab {display: none !important;}
/* Never show "Open Frame in New Tab" when right clicking */
#context-openframeintab {display: none !important;}
Be sure you have the following line in userChrome.css:
 * Do not remove the @namespace line -- it's required for correct functioning.
 * Set default namespace to XUL.
@namespace url("");
The same way can be used to remove other entries from the context menu.