mirror of https://github.com/gorhill/uBlock.git
this fixes #1573
This commit is contained in:
parent
6d79aa43ba
commit
d34d47032d
|
@ -1353,7 +1353,7 @@ var tabWatcher = (function() {
|
|||
tabs = [];
|
||||
}
|
||||
|
||||
var browser, URI, tabId;
|
||||
var browser, tabId;
|
||||
var tabindex = tabs.length, tab;
|
||||
while ( tabindex-- ) {
|
||||
tab = tabs[tabindex];
|
||||
|
@ -1361,11 +1361,6 @@ var tabWatcher = (function() {
|
|||
if ( browser === null ) {
|
||||
continue;
|
||||
}
|
||||
URI = browser.currentURI;
|
||||
// Close extension tabs
|
||||
if ( URI.schemeIs('chrome') && URI.host === location.host ) {
|
||||
vAPI.tabs._remove(tab, getTabBrowser(win));
|
||||
}
|
||||
tabId = browserToTabIdMap.get(browser);
|
||||
if ( tabId !== undefined ) {
|
||||
removeBrowserEntry(tabId, browser);
|
||||
|
|
|
@ -193,6 +193,17 @@ vAPI.messaging = {
|
|||
if ( typeof self.outerShutdown === 'function' ) {
|
||||
outerShutdown();
|
||||
}
|
||||
// https://github.com/gorhill/uBlock/issues/1573
|
||||
// Will let uBO's own web pages close themselves. `window.top` is
|
||||
// used on the assumption that uBO's own web pages will never be
|
||||
// embedded in anything else than its own documents.
|
||||
try {
|
||||
var top = window.top;
|
||||
if ( top.location.href.startsWith(vAPI.getURL('')) ) {
|
||||
top.close();
|
||||
}
|
||||
} catch (ex) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue