mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
one more step to insure tab context is properly set
This commit is contained in:
parent
6bf3d977c1
commit
6c80790975
@ -1938,7 +1938,7 @@ vAPI.onLoadAllCompleted = function() {
|
|||||||
var tabId = this.tabs.getTabId(tab);
|
var tabId = this.tabs.getTabId(tab);
|
||||||
var browser = getBrowserForTab(tab);
|
var browser = getBrowserForTab(tab);
|
||||||
µb.tabContextManager.commit(tabId, browser.currentURI.asciiSpec);
|
µb.tabContextManager.commit(tabId, browser.currentURI.asciiSpec);
|
||||||
µb.bindTabToPageStats(tabId, browser.currentURI.asciiSpec);
|
µb.bindTabToPageStats(tabId);
|
||||||
browser.messageManager.sendAsyncMessage(
|
browser.messageManager.sendAsyncMessage(
|
||||||
location.host + '-load-completed'
|
location.host + '-load-completed'
|
||||||
);
|
);
|
||||||
|
@ -209,6 +209,10 @@ housekeep itself.
|
|||||||
if ( vAPI.isBehindTheSceneTabId(this.tabId) ) {
|
if ( vAPI.isBehindTheSceneTabId(this.tabId) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var count = this.stack.length;
|
||||||
|
if ( count !== 0 && this.stack[count - 1] === url ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.stack.push(url);
|
this.stack.push(url);
|
||||||
this.update();
|
this.update();
|
||||||
};
|
};
|
||||||
|
@ -359,6 +359,8 @@ var onRootFrameHeadersReceived = function(details) {
|
|||||||
// https://github.com/chrisaljoudi/uBlock/issues/516
|
// https://github.com/chrisaljoudi/uBlock/issues/516
|
||||||
if ( headerValue(details.responseHeaders, 'content-type').lastIndexOf('application/x-', 0) === 0 ) {
|
if ( headerValue(details.responseHeaders, 'content-type').lastIndexOf('application/x-', 0) === 0 ) {
|
||||||
µb.tabContextManager.unpush(tabId, details.url);
|
µb.tabContextManager.unpush(tabId, details.url);
|
||||||
|
} else {
|
||||||
|
µb.tabContextManager.push(tabId, details.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup the page store associated with this tab id.
|
// Lookup the page store associated with this tab id.
|
||||||
|
Loading…
Reference in New Issue
Block a user