mirror of https://github.com/gorhill/uBlock.git
#1134: code review
This commit is contained in:
parent
cd76d79110
commit
f417e37b77
|
@ -321,11 +321,7 @@ var is3rdParty = function(srcHostname, desHostname) {
|
||||||
}
|
}
|
||||||
var srcDomain = domainFromHostname(srcHostname);
|
var srcDomain = domainFromHostname(srcHostname);
|
||||||
if ( srcDomain === '' ) {
|
if ( srcDomain === '' ) {
|
||||||
if ( srcHostname !== '' ) {
|
srcDomain = srcHostname !== '' ? srcHostname : desHostname;
|
||||||
srcDomain = srcHostname;
|
|
||||||
} else {
|
|
||||||
srcDomain = desHostname;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ( desHostname.slice(0 - srcDomain.length) !== srcDomain ) {
|
if ( desHostname.slice(0 - srcDomain.length) !== srcDomain ) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue