mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01: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
|
||||
// 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)
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue