I've made a toolbar for firefox. The toolbar contains an item (menu).
As follow, see the code:
<menu id="partner-menu" label="Partner">
<menupopup id="misc-popup">
<menuitem label="Google.com"
oncommand="LoadURL('http://www.google.com/')" />
</menupopup>
</menu>
The Function "LoadURL" loads an URL in the Browser window:
function LoadURL(URL)
{
window._content.document.location = URL;
window.content.focus();
}
Is it possible to open the URL in a new tab?
I think this should help get you started:
var tab = getBrowser().addTab( url );
// And if you want it to load in foreground:
getBrowser().selectedTab = tab;
Thank you! It is also possible to open a url in a new tab, when the
user the the about dialog? The about dialog shows into a new window.
I'am not sure how it is possible.