mirror of https://github.com/gorhill/uBlock.git
Tabs opened from about:newtab are not popup candidates
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1184
This commit is contained in:
parent
188ccb4a04
commit
3632c1821e
|
@ -513,6 +513,10 @@ housekeep itself.
|
|||
}
|
||||
};
|
||||
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1184
|
||||
// Do not consider a tab opened from `about:newtab` to be a popup
|
||||
// candidate.
|
||||
|
||||
const onTabCreated = async function(createDetails) {
|
||||
const { sourceTabId, sourceFrameId, tabId } = createDetails;
|
||||
const popup = popupCandidates.get(tabId);
|
||||
|
@ -533,6 +537,13 @@ housekeep itself.
|
|||
catch (reason) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
Array.isArray(openerDetails) === false ||
|
||||
openerDetails.length !== 2 ||
|
||||
openerDetails[1].url === 'about:newtab'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
popupCandidates.set(
|
||||
tabId,
|
||||
new PopupCandidate(createDetails, openerDetails)
|
||||
|
|
Loading…
Reference in New Issue