├── .gitignore ├── chrome.manifest ├── content └── style.css ├── Makefile ├── bootstrap.js ├── install.rdf └── README.rst /.gitignore: -------------------------------------------------------------------------------- 1 | *.xpi 2 | -------------------------------------------------------------------------------- /chrome.manifest: -------------------------------------------------------------------------------- 1 | content no-close-buttons content/ 2 | -------------------------------------------------------------------------------- /content/style.css: -------------------------------------------------------------------------------- 1 | .tab-close-button { display: none !important; } 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | xpi: 2 | zip -r no-close-buttons.xpi bootstrap.js chrome.manifest install.rdf content 3 | -------------------------------------------------------------------------------- /bootstrap.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | 'use strict'; 6 | 7 | var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService); 8 | var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); 9 | var uri = ios.newURI('chrome://no-close-buttons/content/style.css', null, null); 10 | 11 | function startup(data, reason) { 12 | sss.loadAndRegisterSheet(uri, sss.USER_SHEET); 13 | } 14 | 15 | function shutdown(data, reason) { 16 | sss.unregisterSheet(uri, sss.USER_SHEET); 17 | } 18 | -------------------------------------------------------------------------------- /install.rdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | no-close-buttons@xavamedia.nl 8 | 0.1.2 9 | 2 10 | true 11 | false 12 | true 13 | 14 | 15 | 16 | 17 | {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 18 | 31.0a1 19 | 31.0 20 | 21 | 22 | 23 | 24 | No Close Buttons 25 | Remove close buttons from tabs 26 | Dirkjan Ochtman <dirkjan@ochtman.nl> 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | No Close Buttons 2 | ================ 3 | 4 | Firefox 57 and later 5 | -------------------- 6 | 7 | Firefox 57 and later `do not support`_ any API to make this extension work. 8 | If you prefer your browser tabs without close buttons, you can make it work 9 | by adding a custom ``userChrome.css`` file to your Firefox profile: 10 | 11 | #. Find your `profile folder`_ 12 | #. Create a directory called ``chrome`` inside it if one does not already exist 13 | #. Create a file named ``userChrome.css`` in the new directory 14 | #. Add the following CSS code to it: 15 | 16 | .. code-block:: css 17 | 18 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 19 | .tab-close-button { display: none !important; } 20 | 21 | 22 | #. Open "Advanced Preferences" by typing ``about:config`` in the address bar. 23 | #. Search for ``toolkit.legacyUserProfileCustomizations.stylesheets`` and set it to ``true``. 24 | #. Restart Firefox 25 | 26 | History 27 | ------- 28 | 29 | In Firefox 31, the browser.tabs.closeButtons option was removed. 30 | This restartless addon forces what previously used to be a value of 2 for that option: 31 | no close buttons on any tabs. 32 | 33 | .. _do not support: https://bugzilla.mozilla.org/show_bug.cgi?id=1392589 34 | .. _profile folder: http://kb.mozillazine.org/Profile_folder 35 | --------------------------------------------------------------------------------