mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
this fixes #1076
This commit is contained in:
parent
00122f0b75
commit
d871f158f6
@ -444,7 +444,7 @@ vAPI.tabs.onNavigation = function(details) {
|
||||
}
|
||||
|
||||
var tabContext = µb.tabContextManager.commit(details.tabId, details.url);
|
||||
var pageStore = µb.bindTabToPageStats(details.tabId, 'afterNavigate');
|
||||
var pageStore = µb.bindTabToPageStats(details.tabId, 'tabChanged');
|
||||
|
||||
// https://github.com/chrisaljoudi/uBlock/issues/630
|
||||
// The hostname of the bound document must always be present in the
|
||||
@ -453,8 +453,12 @@ vAPI.tabs.onNavigation = function(details) {
|
||||
// TODO: Eventually, we will have to use an API to check whether a scheme
|
||||
// is supported as I suspect we are going to start to see `ws`, `wss`
|
||||
// as well soon.
|
||||
if ( pageStore && tabContext.rawURL.startsWith('http') ) {
|
||||
pageStore.hostnameToCountMap[tabContext.rootHostname] = 0;
|
||||
if (
|
||||
pageStore &&
|
||||
tabContext.rawURL.startsWith('http') &&
|
||||
pageStore.hostnameToCountMap.hasOwnProperty(tabContext.rootHostname) === false
|
||||
) {
|
||||
pageStore.hostnameToCountMap[tabContext.rootHostname] = 0x00010000;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user