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:
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
Block a user