1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

one more step to insure tab context is properly set

This commit is contained in:
gorhill 2015-04-29 10:29:23 -04:00
parent 6bf3d977c1
commit 6c80790975
3 changed files with 7 additions and 1 deletions

View File

@ -1938,7 +1938,7 @@ vAPI.onLoadAllCompleted = function() {
var tabId = this.tabs.getTabId(tab);
var browser = getBrowserForTab(tab);
µb.tabContextManager.commit(tabId, browser.currentURI.asciiSpec);
µb.bindTabToPageStats(tabId, browser.currentURI.asciiSpec);
µb.bindTabToPageStats(tabId);
browser.messageManager.sendAsyncMessage(
location.host + '-load-completed'
);

View File

@ -209,6 +209,10 @@ housekeep itself.
if ( vAPI.isBehindTheSceneTabId(this.tabId) ) {
return;
}
var count = this.stack.length;
if ( count !== 0 && this.stack[count - 1] === url ) {
return;
}
this.stack.push(url);
this.update();
};

View File

@ -359,6 +359,8 @@ var onRootFrameHeadersReceived = function(details) {
// https://github.com/chrisaljoudi/uBlock/issues/516
if ( headerValue(details.responseHeaders, 'content-type').lastIndexOf('application/x-', 0) === 0 ) {
µb.tabContextManager.unpush(tabId, details.url);
} else {
µb.tabContextManager.push(tabId, details.url);
}
// Lookup the page store associated with this tab id.