mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
#1378: oops -- this is the proper fix
This commit is contained in:
parent
ced9f68918
commit
d42f72caac
1 changed files with 5 additions and 1 deletions
|
|
@ -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 a new issue