Icon/Image in the statusbar of Firefox

By xngo on February 22, 2019

In order for the image/icon to appear in the statusbar of Firefox, you have to add 1 of the following classes: statusbarpanel-iconic, statusbarpanel-iconic-text and statusbarpanel-menu-iconic. Detail definition of each class can be found at https://developer.mozilla.org/en/XUL/statusbarpanel#Style_classes. Here is a code example that I added in my overlay.xul:

<statusbar id="status-bar"><!-- The statusbar id can't be changed. It should match with Firefox's. -->
  <statusbarpanel id="id-statusbarpanel" 
                  image="chrome://yourExtension/skin/mainicon.png"
                  class="statusbarpanel-iconic"
                  tooltiptext="Label shown when mouse is on."
                  />
</statusbar>

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.