I'd like to add a new menu at the end of the main menu bar (file, edit, ...) after the Help menu via an extension i wrote. I already know how to add a new item to one of the menus by something like:
<menupopup id="menu_HelpPopup">
<menuitem id="example-item" oncommand="alert('Hello!');" label="TEST" accesskey="i"/>
</menupopup>
But I didn't get it to work like I explained above.(btw, Where can I look up the id of the menu bar?). this is what i tried so far.
<menubar id="????">
<menu id="test-menu" label="TEST"
accesskey="d">
<menuitem id="example-item2" oncommand="alert('Hello!');" label="TEST" accesskey="i"/>
</menu>
</menubar>
You need the menubar id, which is
main-menubar
and also your missing the menupopup. I have not tested, but this looks right to me:If your trying to find the id of things like the
#main-menubar
I recommend DOM inspector.