In a Firefox browser window, I would like to put a button on the tab header next to the web page title. Is this possible with a Firefox add-on? So far I am still unsure what to call this part of a tab. Sorry for duplicates!
Edit: I didn't have the reputation to add images. Here it is just for clarity (desired button in red)
The short answer to this is: "Yes."
Firefox add-ons have the ability to have almost complete control of the user interface. In this instance, the first level of XUL content that you would want to look at is contained in
chrome://browser/content/browser.xul. This file is contained within theomni.jaarchive in the browser directory within the Firefox release directory. All theomni.jafiles are zip archives which you can view by extracting the files using a program that understands.ziparchives. Depending on your OS, it may be easier to change the extension toomni.zip. Within that archive this file ischrome\browser\content\browser\browser.xul.However the content that you would actually need to modify is located in the
chrome://browser/content/tabbrowser.xmlfile (in the same directory). This files defines what the tab stack looks like. How you go about changing this will depend on the type of add-on you are creating (e.g. overlay, restartless, add-on SDK) and if you want this change to apply to all tabs, or just some.You will probably also want to look at
browser.csswhich will be in a subdirectory of theskindirectory.The XUL structure for this element normally looks like:
The
hboxwithclass="tab-content"is most likely what you will want to modify.In
tabbrowser.xmlit is currently (Firefox 38.0.5) defined as: