|
|
@ -188,18 +188,10 @@ var extractFirstPartyDesDomain = function(srcHostname, desHostname) {
|
|
|
|
if ( srcHostname === '*' || desHostname === '*' || desHostname === '1st-party' ) {
|
|
|
|
if ( srcHostname === '*' || desHostname === '*' || desHostname === '1st-party' ) {
|
|
|
|
return '';
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var desDomain = µm.URI.domainFromHostname(desHostname);
|
|
|
|
var µmuri = µm.URI;
|
|
|
|
if ( desDomain === '' ) {
|
|
|
|
var srcDomain = µmuri.domainFromHostname(srcHostname) || srcHostname;
|
|
|
|
return '';
|
|
|
|
var desDomain = µmuri.domainFromHostname(desHostname) || desHostname;
|
|
|
|
}
|
|
|
|
return desDomain === srcDomain ? desDomain : '';
|
|
|
|
var pos = srcHostname.length - desDomain.length;
|
|
|
|
|
|
|
|
if ( pos < 0 || srcHostname.slice(pos) !== desDomain ) {
|
|
|
|
|
|
|
|
return '';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pos !== 0 && srcHostname.charAt(pos - 1) !== '.' ) {
|
|
|
|
|
|
|
|
return '';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return desDomain;
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
@ -441,8 +433,8 @@ Matrix.prototype.evaluateCellZXY = function(srcHostname, desHostname, type) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 1st-party specific-type cell: it's a special row, it exists only in
|
|
|
|
// 1st-party specific-type cell: it's a special row, looked up only
|
|
|
|
// global scope.
|
|
|
|
// when destination is 1st-party to source.
|
|
|
|
r = this.evaluateCellZ(srcHostname, '1st-party', type);
|
|
|
|
r = this.evaluateCellZ(srcHostname, '1st-party', type);
|
|
|
|
if ( r === 1 ) { return Matrix.RedIndirect; }
|
|
|
|
if ( r === 1 ) { return Matrix.RedIndirect; }
|
|
|
|
if ( r === 2 ) { return Matrix.GreenIndirect; }
|
|
|
|
if ( r === 2 ) { return Matrix.GreenIndirect; }
|
|
|
|