mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-24 03:12:46 +01:00
fix #3053
This commit is contained in:
parent
1402710a1e
commit
83ff2ef26e
@ -656,7 +656,7 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var popunderMatch = function(openerURL, targetURL) {
|
var popunderMatch = function(openerURL, targetURL) {
|
||||||
var result = popupMatch(targetURL, openerURL, null, 'popunder');
|
var result = popupMatch(targetURL, openerURL, 'popunder');
|
||||||
if ( result === 1 ) {
|
if ( result === 1 ) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -674,7 +674,7 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||||||
result = mapPopunderResult(
|
result = mapPopunderResult(
|
||||||
popunderURL,
|
popunderURL,
|
||||||
popunderHostname,
|
popunderHostname,
|
||||||
popupMatch(targetURL, popunderURL, null, 'popup')
|
popupMatch(targetURL, popunderURL, 'popup')
|
||||||
);
|
);
|
||||||
if ( result !== 0 ) {
|
if ( result !== 0 ) {
|
||||||
return result;
|
return result;
|
||||||
@ -688,7 +688,7 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||||||
return mapPopunderResult(
|
return mapPopunderResult(
|
||||||
popunderURL,
|
popunderURL,
|
||||||
popunderHostname,
|
popunderHostname,
|
||||||
popupMatch(targetURL, popunderURL, null, 'popup')
|
popupMatch(targetURL, popunderURL, 'popup')
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -725,18 +725,17 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/gorhill/uBlock/issues/2919
|
|
||||||
// - The target tab matches a clicked link, assume it's legit.
|
|
||||||
if (
|
|
||||||
openerTabId === µb.mouseEventRegister.tabId &&
|
|
||||||
areDifferentURLs(targetURL, µb.mouseEventRegister.url) === false
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Popup test.
|
// Popup test.
|
||||||
var popupType = 'popup',
|
var popupType = 'popup',
|
||||||
|
result = 0;
|
||||||
|
// https://github.com/gorhill/uBlock/issues/2919
|
||||||
|
// - If the target tab matches a clicked link, assume it's legit.
|
||||||
|
if (
|
||||||
|
openerTabId !== µb.mouseEventRegister.tabId ||
|
||||||
|
areDifferentURLs(targetURL, µb.mouseEventRegister.url)
|
||||||
|
) {
|
||||||
result = popupMatch(openerURL, targetURL, 'popup');
|
result = popupMatch(openerURL, targetURL, 'popup');
|
||||||
|
}
|
||||||
|
|
||||||
// Popunder test.
|
// Popunder test.
|
||||||
if ( result === 0 ) {
|
if ( result === 0 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user