mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 10:22:51 +01:00
fix #3287
This commit is contained in:
parent
0c2b715e61
commit
426d9e9db1
@ -547,18 +547,21 @@ vAPI.tabs.onPopupUpdated = (function() {
|
||||
logData;
|
||||
|
||||
// https://github.com/gorhill/uBlock/commit/1d448b85b2931412508aa01bf899e0b6f0033626#commitcomment-14944764
|
||||
// See if two URLs are different, disregarding scheme -- because the scheme
|
||||
// can be unilaterally changed by the browser.
|
||||
// See if two URLs are different, disregarding scheme -- because the
|
||||
// scheme can be unilaterally changed by the browser.
|
||||
// https://github.com/gorhill/uBlock/issues/1378
|
||||
// Maybe no link element was clicked.
|
||||
var areDifferentURLs = function(a, b) {
|
||||
// https://github.com/gorhill/uBlock/issues/1378
|
||||
// Maybe no link element was clicked.
|
||||
if ( b === '' ) { return true; }
|
||||
if ( b.startsWith('about:') ) { return false; }
|
||||
var pos = a.indexOf('://');
|
||||
if ( pos === -1 ) { return false; }
|
||||
a = a.slice(pos);
|
||||
pos = b.indexOf('://');
|
||||
if ( pos === -1 ) { return false; }
|
||||
return b.slice(pos) !== a;
|
||||
if ( pos !== -1 ) {
|
||||
b = b.slice(pos);
|
||||
}
|
||||
return b !== a;
|
||||
};
|
||||
|
||||
var popupMatch = function(openerURL, targetURL, popupType) {
|
||||
|
Loading…
Reference in New Issue
Block a user