Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>well I use this code to add toolbar button in <code>navbar</code>, but this works only for the first time for the fresh installation and not for the next installation i.e. upgrading of the addon as user can move/drag the icon to different location. So, you need to try this in the new <a href="https://developer.mozilla.org/en/Command_Line_Options#User_Profile" rel="nofollow">firefox profile</a>. Here is the code:<br></p> <pre><code>//plcae toolbar icon var navbar = document.getElementById("nav-bar"); var newset = navbar.currentSet + ",MYBUTTON_ID"; navbar.currentSet = newset; navbar.setAttribute("currentset", newset ); document.persist("nav-bar", "currentset"); </code></pre> <p><br/>and here is the code for XUL Overlay:</p> <pre><code>&lt;toolbarpalette id="BrowserToolbarPalette"&gt; &lt;toolbarbutton id="MYBUTTON_ID" inserbefore="searchBar" class="toolbarbutton-1 chromeclass-toolbar-additional" label="MYBUTTON_ID" tooltiptext="MYBUTTON_ID" onclick="MYBUTTON_ID()"/&gt; &lt;/toolbarpalette&gt; </code></pre> <p><br/><br/>or <strong>you can force</strong> the icon to display in nav bar against user will, this will take effect after each firefox restart, however not recommended</p> <pre><code>var navbar = document.getElementById("nav-bar"); var newset = navbar.currentSet; if (newset.indexOf("MYBUTTON_ID") == -1) { if (newset.indexOf("reload-button,stop-button,") &gt; -1) newset = newset.replace("reload-button,stop-button,", "reload-button,stop-button,MYBUTTON_ID,"); else newset = newset + ",MYBUTTON_ID"; navbar.currentSet = newset; navbar.setAttribute("currentset", newset ); document.persist("nav-bar", "currentset"); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload