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