1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00
This commit is contained in:
gorhill 2015-01-11 09:47:14 -05:00
parent adbbd74436
commit 5201946c3f
2 changed files with 4 additions and 1 deletions

View File

@ -202,6 +202,9 @@ Matrix.prototype.clearRegisters = function() {
var is3rdParty = function(srcHostname, desHostname) {
var srcDomain = domainFromHostname(srcHostname);
if ( srcDomain === '' ) {
srcDomain = desHostname;
}
if ( desHostname.slice(0 - srcDomain.length) !== srcDomain ) {
return true;
}

View File

@ -118,7 +118,7 @@ var getHostnameDict = function(hostnameToCountMap) {
if ( r.hasOwnProperty(hostname) ) {
continue;
}
domain = domainFromHostname(hostname);
domain = domainFromHostname(hostname) || hostname;
counts = hostnameToCountMap[domain] || 0;
r[domain] = {
domain: domain,