diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index 46940cae..9a841008 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -212,7 +212,7 @@ var TreeStyleTabWindowHelper = { eval('window.openLinkIn = '+ window.openLinkIn.toSource().replace( /((b|newTab = w\.gB)rowser.loadOneTab\()/g, - 'TreeStyleTabService.onBeforeOpenLinkWithParams(params); $1' + 'TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab); $1' ) ); } diff --git a/modules/window.js b/modules/window.js index 49caee9f..f9a09136 100644 --- a/modules/window.js +++ b/modules/window.js @@ -1213,11 +1213,10 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, { this.handleNewTabFromCurrent(aOwner); }, - onBeforeOpenLinkWithParams : function TSTWindow_onBeforeOpenLinkWithParams(aParams) + onBeforeOpenLinkWithTab : function TSTWindow_onBeforeOpenLinkWithParams(aTab) { - if (aParams.linkNode && - !this.checkToOpenChildTab(aParams.linkNode.ownerDocument.defaultView)) - this.handleNewTabFromCurrent(aParams.linkNode.ownerDocument.defaultView); + if (aTab && !this.checkToOpenChildTab(aTab)) + this.handleNewTabFromCurrent(aTab); }, onBeforeOpenNewTabByThirdParty : function TSTWindow_onBeforeOpenNewTabByThirdParty(aOwner)