mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
this fixes regression re. popup/popunder blocking for Seamonkey
This commit is contained in:
parent
4fd71d4209
commit
11351bca6d
@ -938,15 +938,19 @@ vAPI.tabs._remove = (function() {
|
|||||||
tabBrowser.closeTab(tab);
|
tabBrowser.closeTab(tab);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return function(tab, tabBrowser) {
|
return function(tab, tabBrowser, nuke) {
|
||||||
tabBrowser.removeTab(tab);
|
if ( tabBrowser.tabs.length === 1 && nuke ) {
|
||||||
|
getOwnerWindow(tab).close();
|
||||||
|
} else {
|
||||||
|
tabBrowser.removeTab(tab);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
vAPI.tabs.remove = (function() {
|
vAPI.tabs.remove = (function() {
|
||||||
var remove = function(tabId) {
|
var remove = function(tabId, nuke) {
|
||||||
var browser = tabWatcher.browserFromTabId(tabId);
|
var browser = tabWatcher.browserFromTabId(tabId);
|
||||||
if ( !browser ) {
|
if ( !browser ) {
|
||||||
return;
|
return;
|
||||||
@ -955,12 +959,12 @@ vAPI.tabs.remove = (function() {
|
|||||||
if ( !tab ) {
|
if ( !tab ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._remove(tab, getTabBrowser(getOwnerWindow(browser)));
|
this._remove(tab, getTabBrowser(getOwnerWindow(browser)), nuke);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Do this asynchronously
|
// Do this asynchronously
|
||||||
return function(tabId) {
|
return function(tabId, nuke) {
|
||||||
vAPI.setTimeout(remove.bind(this, tabId), 10);
|
vAPI.setTimeout(remove.bind(this, tabId, nuke), 1);
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||||||
|
|
||||||
// It is a popup, block and remove the tab.
|
// It is a popup, block and remove the tab.
|
||||||
µb.unbindTabFromPageStats(targetTabId);
|
µb.unbindTabFromPageStats(targetTabId);
|
||||||
vAPI.tabs.remove(targetTabId);
|
vAPI.tabs.remove(targetTabId, true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user