From c51112886a157af8baf3dd335721202ef8a164f4 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Thu, 18 Feb 2016 20:12:50 +0900 Subject: [PATCH] Detect dummy group tab correctly even if it is still loading --- modules/base.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/base.js b/modules/base.js index 75093ccc..3c137347 100644 --- a/modules/base.js +++ b/modules/base.js @@ -2065,17 +2065,26 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, { isGroupTab : function TSTBase_isGroupTab(aTab, aLazyCheck) { - return aTab.linkedBrowser.currentURI.spec.indexOf('about:treestyletab-group') == 0; + return this.getLoadingURI(aTab).indexOf('about:treestyletab-group') == 0; }, isTemporaryGroupTab : function TSTBase_isTemporaryGroupTab(aTab) { return ( this.isGroupTab(aTab) && - /.*[\?&;]temporary=(?:1|yes|true)/i.test(aTab.linkedBrowser.currentURI.spec) + /.*[\?&;]temporary=(?:1|yes|true)/i.test(this.getLoadingURI(aTab)) ); }, + getLoadingURI : function TSTBase_getLoadingURI(aTab) + { + var uri = aTab.linkedBrowser.currentURI; + if (uri.spec == 'about:blank' && + aTab.linkedBrowser.userTypedValue) + return aTab.linkedBrowser.userTypedValue; + return uri.spec; + }, + get pinnedTabsCount() { return this.browser.mTabContainer.querySelectorAll('tab[pinned="true"]').length;