Talk:Generalization of Joga extension

From CDOT Wiki
Revision as of 12:53, 1 December 2006 by Pcvitori (talk | contribs)
Jump to: navigation, search

You should consider adding a screenshot of your extension so people can see it without having to install it first. (David.humphrey 16:03, 21 November 2006 (EST))

Hey paul, this is how you create a new tab into Firefox:

function openInNewTab (webpage)
    if(webpage != '')
    {
	var newTab = gBrowser.addTab(webpage); 
        gBrowser.selectedTab = newTab; 
    }
}

Let me know if this works. --Pcvitori 11:52, 29 November 2006 (EST)

Sorry i forgot to show you how to get the gBrowser variable. The following is the modified code.

function openInNewTab (webpage)
    if(webpage != '')
    {
        var gBrowser = window.opener.getBrowser();
	var newTab = gBrowser.addTab(webpage); 
        gBrowser.selectedTab = newTab; 
    }
}

--Pcvitori 11:53, 1 December 2006 (EST)