Difference between revisions of "Talk:Generalization of Joga extension"
Line 14: | Line 14: | ||
Let me know if this works. --[[User:Pcvitori|Pcvitori]] 11:52, 29 November 2006 (EST) | Let me know if this works. --[[User:Pcvitori|Pcvitori]] 11:52, 29 November 2006 (EST) | ||
+ | |||
+ | Sorry i forgot to show you have to get the gBrowser variable. The following is the modified code. | ||
+ | |||
+ | <pre> | ||
+ | function openInNewTab (webpage) | ||
+ | if(webpage != '') | ||
+ | { | ||
+ | var gBrowser = window.opener.getBrowser(); | ||
+ | var newTab = gBrowser.addTab(webpage); | ||
+ | gBrowser.selectedTab = newTab; | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
+ | --[[User:Pcvitori|Pcvitori]] 11:53, 1 December 2006 (EST) |
Revision as of 11:53, 1 December 2006
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 have 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)