1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

#1134: code review

This commit is contained in:
gorhill 2015-03-31 07:36:19 -04:00
parent cd76d79110
commit f417e37b77

View File

@ -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;