mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
fix #3165
This commit is contained in:
parent
47c7da377e
commit
9b891384af
1 changed files with 8 additions and 5 deletions
|
@ -334,11 +334,16 @@ housekeep itself.
|
||||||
// tab, there is no longer any ambiguity about which root URL is really
|
// tab, there is no longer any ambiguity about which root URL is really
|
||||||
// sitting in which tab.
|
// sitting in which tab.
|
||||||
TabContext.prototype.commit = function(url) {
|
TabContext.prototype.commit = function(url) {
|
||||||
if ( vAPI.isBehindTheSceneTabId(this.tabId) ) {
|
if ( vAPI.isBehindTheSceneTabId(this.tabId) ) { return; }
|
||||||
return;
|
if ( this.stack.length !== 0 ) {
|
||||||
|
var top = this.stack[this.stack.length - 1];
|
||||||
|
if ( top.url === url && top.committed ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.stack = [new StackEntry(url, true)];
|
this.stack = [new StackEntry(url, true)];
|
||||||
this.update();
|
this.update();
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
TabContext.prototype.getNetFilteringSwitch = function() {
|
TabContext.prototype.getNetFilteringSwitch = function() {
|
||||||
|
@ -411,8 +416,7 @@ housekeep itself.
|
||||||
var entry = tabContexts[tabId];
|
var entry = tabContexts[tabId];
|
||||||
if ( entry === undefined ) {
|
if ( entry === undefined ) {
|
||||||
entry = push(tabId, url);
|
entry = push(tabId, url);
|
||||||
} else {
|
} else if ( entry.commit(url) ) {
|
||||||
entry.commit(url);
|
|
||||||
popupCandidateTest(tabId);
|
popupCandidateTest(tabId);
|
||||||
}
|
}
|
||||||
return entry;
|
return entry;
|
||||||
|
@ -499,7 +503,6 @@ vAPI.tabs.onUpdated = function(tabId, changeInfo, tab) {
|
||||||
if ( !changeInfo.url ) {
|
if ( !changeInfo.url ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
µb.tabContextManager.commit(tabId, changeInfo.url);
|
µb.tabContextManager.commit(tabId, changeInfo.url);
|
||||||
µb.bindTabToPageStats(tabId, 'tabUpdated');
|
µb.bindTabToPageStats(tabId, 'tabUpdated');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue