Skip to content

Commit

Permalink
fix #3287
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Nov 27, 2017
1 parent 0c2b715 commit 426d9e9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/js/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 426d9e9

Please sign in to comment.