#urlbar-notification-button Use this with your Firefox add-on to place buttons in the url bar! Buttons are sdk objects, so panels can be attached to them, just like standard sdk toggle buttons.
In the add-on directory:
$ npm install urlbar-notification-button --save
In your add-on code, import the class:
const { Button } = require('url-bar-notification-button');
You can then construct a button as follows:
const settings = {
id,
className,
message, // message that button will display
styleLocation, // place within data/ of your add-on directory
iconLocation, // place within data/ of your add-on directory,
};
const button = new Button(FirefoxWindow, onClickCallbackFn, settings);
Methods:
destroy()
show()
hide()
This add-on is licensed under the MPLv2. See the LICENSE
file for details.