How to remove an option from Firefox context menu
- Look up the CSS selector of the option:
- open developer tools ([F12] or options button (---) -> Web Developer -> Toggle Tools);
- open the settings ([F1] or options button (...) -> Settings);
- select checkbox "Enable browser chrome and add-on debugging toolboxes";
- select checkbox "Enable remote debugging";
- open browser debugging toolbox by pressing [Ctrl]+[Alt]+[Shift]+[I];
- confirm "Incoming Connection" by "OK";
- in the browser debugging toolbox, click on options button (...) -> Disable popup auto-hide (you can manually close the popups by pressing [Esc]);
- open a context menu the option appears in;
for example, if you want to remove "Email Image...", right-click on some image on any web page; - switch back to the browser debugging toolbox window;
if it is not visible and cannot be switched to by using the mouse, use the appropriate key shortcuts, e.g., [Alt]+[Tab]; - look up the selector as with a web page – using "Inspect Element".
The CSS selector for option "Email Image..." is:#context-sendimage
- Add a CSS definition that hides the element:
- open "userChrome.css":
- options button (---) -> Help -> Troubleshooting Information -> Open Directory;
- create or open folder "chrome";
- create or open file "userChrome.css";
- add a CSS definition to the content of the file, that would hide "Email Image..." element:
#context-sendimage { display: none; }
- open "userChrome.css":
- do not forget to reset the popup auto-hide option (and other settings that were changed).
- if the customisations do not get applied and you're using Firefox ≥69, you need to enable the loading of "userChrome.css" (which is disabled by default because it supposedly slows down the startup of Firefox a bit):
- open address "about:config" (type it into the address bar and press [Enter]);
- click on "Accept the Risk and Continue";
- find option "toolkit.legacyUserProfileCustomizations.stylesheets" (paste its name into the filter bar);
- double-click on the option to switch it to "true";
- close the tab.
See also: