1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-02 10:24:59 +12:00

this fixes #37 completely

This commit is contained in:
gorhill 2014-11-02 18:34:03 -05:00
parent 5808aadca0
commit 1908504895

View file

@ -102,11 +102,10 @@
return this.pageStats[pageURL];
}
var pageStore;
// https://github.com/gorhill/uMatrix/issues/37
// Just rebind: the URL changed, but the document itself is the same.
// Example: Google Maps, Github
var pageStore;
if ( context === 'pageUpdated' && this.pageStats.hasOwnProperty(previousPageURL) ) {
pageStore = this.pageStats[previousPageURL];
pageStore.pageUrl = pageURL;
@ -129,6 +128,9 @@
return pageStore;
}
// https://github.com/gorhill/uMatrix/issues/37
this.updateBadgeAsync(pageURL);
this.unbindTabFromPageStats(tabId);
// rhill 2014-02-08: Do not create an entry if no page store
@ -138,9 +140,6 @@
return null;
}
// https://github.com/gorhill/uMatrix/issues/37
this.updateBadgeAsync(pageURL);
this.pageUrlToTabId[pageURL] = tabId;
this.tabIdToPageUrl[tabId] = pageURL;
pageStore.boundCount += 1;