From af6e5d0ba7bf434c1f1f64a383014efd079132f7 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Tue, 30 Sep 2014 15:12:29 +0900 Subject: [PATCH] Don't open new tab from Ctrl-T as a new tab from content link --- content/treestyletab/windowHelper.js | 2 +- modules/window.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index 9a841008..242223f1 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.onBeforeOpenLinkWithTab(gBrowser.selectedTab); $1' + 'TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab, aFromChrome); $1' ) ); } diff --git a/modules/window.js b/modules/window.js index c41eee7a..be05fdbd 100644 --- a/modules/window.js +++ b/modules/window.js @@ -1213,9 +1213,9 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, { this.handleNewTabFromCurrent(aOwner); }, - onBeforeOpenLinkWithTab : function TSTWindow_onBeforeOpenLinkWithTab(aTab) + onBeforeOpenLinkWithTab : function TSTWindow_onBeforeOpenLinkWithTab(aTab, aFromChrome) { - if (aTab && !this.checkToOpenChildTab(aTab)) + if (!aFromChrome && aTab && !this.checkToOpenChildTab(aTab)) this.handleNewTabFromCurrent(aTab); },