From a17733656e210b41a2417d4f85b85a14e5de266d Mon Sep 17 00:00:00 2001 From: SHIMODA Hiroshi Date: Wed, 2 May 2012 20:41:49 +0900 Subject: [PATCH] Handle new tabs from the "new tab" button correctly on Firefox 11 and later --- content/treestyletab/windowHelper.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index a19f8ac1..c180d236 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -36,8 +36,10 @@ var TreeStyleTabWindowHelper = { if ('BrowserOpenTab' in window) { eval('window.BrowserOpenTab = '+ window.BrowserOpenTab.toSource().replace( - 'gBrowser.loadOneTab(', - 'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $&' + // loadOneTab => Firefox 10 or olders + // openUILinkIn => Firefox 11 or later + /(gBrowser\.loadOneTab\(|openUILinkIn\(.+\,\s*"tab"\))/, + 'gBrowser.treeStyleTab.onBeforeNewTabCommand(); $1' ) ); }