1
0
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:
gorhill 2016-02-14 11:02:43 -05:00
parent ced9f68918
commit d42f72caac

View File

@ -524,6 +524,11 @@ vAPI.tabs.onPopupUpdated = (function() {
// See if two URLs are different, disregarding scheme -- because the scheme
// can be unilaterally changed by the browser.
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('://');
if ( pos === -1 ) {
return false;
@ -561,7 +566,6 @@ vAPI.tabs.onPopupUpdated = (function() {
// Check user switch first
if (
popupType !== 'popunder' &&
clickedURL !== '' &&
areDifferentURLs(targetURL, clickedURL) &&
µb.hnSwitches.evaluateZ('no-popups', openerHostname)
) {