this fixes #72

This commit is contained in:
gorhill 2014-07-16 17:20:11 -04:00
parent 2050c187be
commit 1eda476869
2 changed files with 4 additions and 2 deletions

View File

@ -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);
/******************************************************************************/

View File

@ -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];
};