diff --git a/content/treestyletab/hacks.js b/content/treestyletab/hacks.js index 16bf3758..f6c3b2b2 100644 --- a/content/treestyletab/hacks.js +++ b/content/treestyletab/hacks.js @@ -93,7 +93,8 @@ TreeStyleTabService.overrideExtensionsOnInitBefore = function() { flst.tb = gBrowser; flst.tabBox = flst.tb.mTabBox; } - if ('ensureTabIsVisible' in gBrowser.mTabContainer) { + if ('isTabVisible' in gBrowser.mTabContainer && + 'ensureTabIsVisible' in gBrowser.mTabContainer) { function replaceHorizontalProps(aString) { return aString.replace( @@ -110,15 +111,16 @@ TreeStyleTabService.overrideExtensionsOnInitBefore = function() { ]]> ) } - eval('gBrowser.mTabContainer.isTabVisible = '+ - replaceHorizontalProps(gBrowser.mTabContainer.isTabVisible.toSource()) - ); eval('gBrowser.mTabContainer.ensureTabIsVisible = '+ replaceHorizontalProps(gBrowser.mTabContainer.ensureTabIsVisible.toSource().replace( 'tabhbox.boxObject.width < 250', '$& && !gBrowser.treeStyleTab.isVertical' )) ); + if (!this.getTreePref('TMP.doNotUpdate.isTabVisible')) + eval('gBrowser.mTabContainer.isTabVisible = '+ + replaceHorizontalProps(gBrowser.mTabContainer.isTabVisible.toSource()) + ); } }; diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 693a7d0d..039f53e8 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -74,5 +74,8 @@ pref("browser.tabs.loadFolderAndReplace.override", false); pref("extensions.multipletab.show.multipletab-selection-item-removeTabSubTree", true); +pref("extensions.treestyletab.TMP.doNotUpdate.isTabVisible", false); + + pref("extensions.treestyletab@piro.sakura.ne.jp.name", "chrome://treestyletab/locale/treestyletab.properties"); pref("extensions.treestyletab@piro.sakura.ne.jp.description", "chrome://treestyletab/locale/treestyletab.properties");