- Add a command that calls a function defined in our javascript file:
<commandset id="mainCommandSet">
<command id="cmd_doAThing" oncommand="Fixme.doAThing('Hey everybody!');"/>
</commandset>
- Use DOM inspector to find the id of the popup under tools-menu. Add a menu item that calls the command:
<menupopup id="??">
<menuitem label="Do A Thing" command="cmd_doAThing"/>
</menupopup>
- Use DOM inspector to find the id of the custom toolbar. Add a button to the toolbar that calls the command:
<toolbar id="??">
<button label="Do A Thing" command="cmd_doAThing"/>
</toolbar>
- Restart Firefox and try it out!