mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-04 08:37:11 +02:00
#1378: oops -- this is the proper fix
This commit is contained in:
parent
ced9f68918
commit
d42f72caac
@ -524,6 +524,11 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||||||
// See if two URLs are different, disregarding scheme -- because the scheme
|
// See if two URLs are different, disregarding scheme -- because the scheme
|
||||||
// can be unilaterally changed by the browser.
|
// can be unilaterally changed by the browser.
|
||||||
var areDifferentURLs = function(a, b) {
|
var areDifferentURLs = function(a, b) {
|
||||||
|
// https://github.com/gorhill/uBlock/issues/1378
|
||||||
|
// Maybe no link element was clicked.
|
||||||
|
if ( b === '' ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
var pos = a.indexOf('://');
|
var pos = a.indexOf('://');
|
||||||
if ( pos === -1 ) {
|
if ( pos === -1 ) {
|
||||||
return false;
|
return false;
|
||||||
@ -561,7 +566,6 @@ vAPI.tabs.onPopupUpdated = (function() {
|
|||||||
// Check user switch first
|
// Check user switch first
|
||||||
if (
|
if (
|
||||||
popupType !== 'popunder' &&
|
popupType !== 'popunder' &&
|
||||||
clickedURL !== '' &&
|
|
||||||
areDifferentURLs(targetURL, clickedURL) &&
|
areDifferentURLs(targetURL, clickedURL) &&
|
||||||
µb.hnSwitches.evaluateZ('no-popups', openerHostname)
|
µb.hnSwitches.evaluateZ('no-popups', openerHostname)
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user