diff --git a/js/popup.js b/js/popup.js index e578f2bbf..b0f948927 100644 --- a/js/popup.js +++ b/js/popup.js @@ -125,7 +125,7 @@ var onTabsReceived = function(tabs) { messaging.ask( q, onStatsReceived ); }; -chrome.tabs.query({ active: true }, onTabsReceived); +chrome.tabs.query({ active: true, currentWindow: true }, onTabsReceived); /******************************************************************************/ diff --git a/js/tab.js b/js/tab.js index a0e189397..b687b3d0e 100644 --- a/js/tab.js +++ b/js/tab.js @@ -108,6 +108,8 @@ return null; } + //console.debug('µBlock> bindTabToPageStats(%d, "%s")', tabId, pageURL); + // Reuse page store if one exists: this allows to guess if a tab is // a popup. var pageStore = this.pageStores[tabId]; @@ -117,13 +119,13 @@ pageStore = this.PageStore.factory(tabId, pageURL); } - //console.log('µBlock> bindTabToPageStats(%d, "%s")', tabId, pageURL); this.pageStores[tabId] = pageStore; return pageStore; }; µBlock.unbindTabFromPageStats = function(tabId) { + //console.debug('µBlock> unbindTabFromPageStats(%d)', tabId); delete this.pageStores[tabId]; };