Firefox - - Combine the stop and reload icons

December 2016






Combine the stop and refresh icons



In Firefox, the "reload" button is only useful if the page has finished loading. Instead of that, the "stop loading" is used only during the page load, meaning that it was always one of two buttons that serves no purpose.
They can be "combined" to save space (this is what they have done for the future Firefox 4).

Handling is very easy.

Prerequisite


We must reverse the two buttons in the toolbar:



Right click on an empty area of the interface, then "customize". A window with the various optional buttons appear: do not touch it.
By cons, on the Firefox interface, the elements are now removable. Simply swap the two buttons "refresh" and "stop".

Implementation


Now we must edit a file in Firefox. Go to the folder of the Firefox profile (see here).

Enter the Chrome folder and create there a userChrome.css file and then open it. If this file already exists, open it.

In the file, simply add:

#stop-button[disabled] { display:none; } 
#stop-button:not([disabled]) { display:auto; } 
#stop-button:not([disabled]) + #reload-button { display:none; }


Save the file and restart Firefox.
It should be Ok.

Explanations


The Firefox interface contains elements with names. The stop button is called "# stop-button" and the refresh button "# reload-button.
The first line is the "stop" button is not displayed (display: none) where it is turned off ([disabled])

The second line can just display the stop button is used only if (he is not disabled (it is thus enabled) (not ([disabled ]))).

The last line is used to hide the "reload" button only when the "stop" button is activated, and there will always only one button displayed.
We reversed the order of buttons ,because the userChrome.css file is encoded in language (CSS) which allows only target elements that follow other and not above that. In reversing the elements, we can target the button "reload" as the stop button, and that's what we want.

Related :

This document entitled « Firefox - - Combine the stop and reload icons » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.