'Close Tab' button

User Help for Mozilla Firefox
Post Reply
Derfram
Posts: 44
Joined: August 22nd, 2006, 10:11 pm

'Close Tab' button

Post by Derfram »

FIrefox 74.0. Is there a config edit (or an add-on) that disables the close button on tabs not in focus? I would like tabs not being viewed to be protected from being closed.
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Re: 'Close Tab' button

Post by dickvl »

You can use code in userChrome.css to hide the close button on not selected tabs

Code: Select all

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

/* tab close button on selected tab */
.tabbrowser-tab:not([selected]) .tab-close-button { display: none !important; }
See also:
https://www.userchrome.org/what-is-userchrome-css.html
https://www.userchrome.org/how-create-u ... e-css.html

You need to set toolkit.legacyUserProfileCustomizations.stylesheets = true on the about:config page to enable userChrome.css and userContent.css in the chrome folder.

See:
https://www.userchrome.org/firefox-chan ... e-css.html
Tushman
Posts: 210
Joined: May 4th, 2005, 7:50 pm

Re: 'Close Tab' button

Post by Tushman »

The add-on called TMP (Tab Mix Plus) used to do that but it is not compatible with Quantum Firefox. The author has released a new version called "Tab Mix Links" but many of the old features are completely missing. Have you looked in the Mozilla add-on store to see what's available? If nothing is of interest to you, you may need to write your own custom CSS code for such a feature.
Derfram
Posts: 44
Joined: August 22nd, 2006, 10:11 pm

Re: 'Close Tab' button

Post by Derfram »

dickvl-
Thank you, works perfectly!
Post Reply