mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 17:49:39 +02:00
No need for special treatment for about:blank and about:newtab
This commit is contained in:
parent
49442e237e
commit
50dfc40f26
@ -331,25 +331,8 @@ var tabWatcher = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onTabSelect: function({target}) {
|
onTabSelect: function({target}) {
|
||||||
// target is tab in Firefox, browser in Fennec
|
vAPI.setIcon(vAPI.tabs.getTabId(target), getOwnerWindow(target));
|
||||||
var browser = (target.linkedBrowser || target);
|
|
||||||
var URI = browser.currentURI;
|
|
||||||
var aboutPath = URI.schemeIs('about') && URI.path;
|
|
||||||
var tabId = vAPI.tabs.getTabId(target);
|
|
||||||
|
|
||||||
if ( !aboutPath || (aboutPath !== 'blank' && aboutPath !== 'newtab') ) {
|
|
||||||
vAPI.setIcon(tabId, getOwnerWindow(target));
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if ( browser.webNavigation.busyFlags === 0 || /*BUSY_FLAGS_NONE*/
|
|
||||||
browser.webNavigation.busyFlags === undefined) {
|
|
||||||
vAPI.tabs.onNavigation({
|
|
||||||
frameId: 0,
|
|
||||||
tabId: tabId,
|
|
||||||
url: URI.asciiSpec
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onLocationChange: function(browser, webProgress, request, location, flags) {
|
onLocationChange: function(browser, webProgress, request, location, flags) {
|
||||||
|
Loading…
Reference in New Issue
Block a user