How to remove the Close Multiple Tabs and Select All Tabs commands from Firefox's tab context menu - l10nelw/select-tabs GitHub Wiki

Reasons to do it

  • You never use them.
  • Close Multiple Tabs becomes redundant now that you can Select Tabs > To the Left/Right and then Ctrl+W.
  • So that Select Tabs doesn't have to share the S access key with Select All Tabs.

Instructions

Set up userChrome.css

If you already have a working userChrome.css setup, skip this section.

  1. Enter about:config in the address bar to access advanced preferences (you may be asked an "accept the risk" confirmation).
  2. Search for the toolkit.legacyUserProfileCustomizations.stylesheets setting, which enables support for userChrome.css.
  3. If the setting is not true, double-click it to toggle it.
  4. Enter about:support in the address bar to find your Profile Folder. Open it.
  5. In your profile folder, create a folder named chrome, and inside it create a plain text file named userChrome.css.

In your userChrome.css file

  1. Add the following rule:
    /* Remove items from tab context menu */
    #context_closeTabOptions,
    #context_selectAllTabs
    { display: none !important; }
    
  2. Save the file and Restart Firefox.