diff --git a/src/js/matrix.js b/src/js/matrix.js index 841d132..6695838 100644 --- a/src/js/matrix.js +++ b/src/js/matrix.js @@ -130,17 +130,11 @@ var extractFirstPartyDesDomain = function(srcHostname, desHostname) { if ( srcHostname === '*' || desHostname === '*' || desHostname === '1st-party' ) { return ''; } - var srcLength = srcHostname.length; - var desLength = desHostname.length; - var len = srcLength < desLength ? srcLength : desLength; - if ( srcHostname.slice(-len) !== desHostname.slice(-len) ) { - return ''; - } var desDomain = µm.URI.domainFromHostname(desHostname); if ( desDomain === '' ) { return ''; } - var pos = srcLength - desDomain.length; + var pos = srcHostname.length - desDomain.length; if ( pos < 0 || srcHostname.slice(pos) !== desDomain ) { return ''; }