1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-01 18:10:17 +12:00

Fixing #1017, only apply switch to about:blank or about:newtab if not loading

This commit is contained in:
AlexVallat 2015-03-15 16:05:39 +00:00 committed by gorhill
parent aa80edc171
commit 2643125f66

View file

@ -308,7 +308,8 @@ var tabWatcher = {
onTabSelect: function({target}) {
// target is tab in Firefox, browser in Fennec
var URI = (target.linkedBrowser || target).currentURI;
var browser = (target.linkedBrowser || target);
var URI = browser.currentURI;
var aboutPath = URI.schemeIs('about') && URI.path;
var tabId = vAPI.tabs.getTabId(target);
@ -317,11 +318,13 @@ var tabWatcher = {
return;
}
vAPI.tabs.onNavigation({
frameId: 0,
tabId: tabId,
url: URI.asciiSpec
});
if ( browser.webNavigation.busyFlags === 0 /*BUSY_FLAGS_NONE*/ ) {
vAPI.tabs.onNavigation({
frameId: 0,
tabId: tabId,
url: URI.asciiSpec
});
}
},
onLocationChange: function(browser, webProgress, request, location, flags) {