1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-18 17:02:27 +02:00
This commit is contained in:
gorhill 2014-09-21 15:14:55 -04:00
parent c48a99c4bf
commit 1940321354
2 changed files with 5 additions and 8 deletions

View File

@ -558,11 +558,10 @@ FilterContainer.prototype.addGenericSelector = function(parsed) {
} }
if ( entries[parsed.suffix] === undefined ) { if ( entries[parsed.suffix] === undefined ) {
entries[parsed.suffix] = true; entries[parsed.suffix] = true;
this.acceptedCount += 1;
} else { } else {
this.duplicateCount += 1; this.duplicateCount += 1;
} }
return true; this.acceptedCount += 1;
}; };
/******************************************************************************/ /******************************************************************************/
@ -581,13 +580,12 @@ FilterContainer.prototype.addHostnameSelector = function(hostname, parsed) {
if ( entry === undefined ) { if ( entry === undefined ) {
entry = entries[hostname] = {}; entry = entries[hostname] = {};
entry[parsed.suffix] = true; entry[parsed.suffix] = true;
this.acceptedCount += 1;
} else if ( entry[parsed.suffix] === undefined ) { } else if ( entry[parsed.suffix] === undefined ) {
entry[parsed.suffix] = true; entry[parsed.suffix] = true;
this.acceptedCount += 1;
} else { } else {
this.duplicateCount += 1; this.duplicateCount += 1;
} }
this.acceptedCount += 1;
}; };
/******************************************************************************/ /******************************************************************************/
@ -601,13 +599,12 @@ FilterContainer.prototype.addEntitySelector = function(hostname, parsed) {
if ( entry === undefined ) { if ( entry === undefined ) {
entry = entries[entity] = {}; entry = entries[entity] = {};
entry[parsed.suffix] = true; entry[parsed.suffix] = true;
this.acceptedCount += 1;
} else if ( entry[parsed.suffix] === undefined ) { } else if ( entry[parsed.suffix] === undefined ) {
entry[parsed.suffix] = true; entry[parsed.suffix] = true;
this.acceptedCount += 1;
} else { } else {
this.duplicateCount += 1; this.duplicateCount += 1;
} }
this.acceptedCount += 1;
}; };
/******************************************************************************/ /******************************************************************************/

View File

@ -411,8 +411,8 @@
duplicateCount = netFilteringEngine.duplicateCount + cosmeticFilteringEngine.duplicateCount - duplicateCount; duplicateCount = netFilteringEngine.duplicateCount + cosmeticFilteringEngine.duplicateCount - duplicateCount;
acceptedCount = netFilteringEngine.acceptedCount + cosmeticFilteringEngine.acceptedCount - acceptedCount; acceptedCount = netFilteringEngine.acceptedCount + cosmeticFilteringEngine.acceptedCount - acceptedCount;
this.remoteBlacklists[details.path].entryCount = acceptedCount + duplicateCount; this.remoteBlacklists[details.path].entryCount = acceptedCount;
this.remoteBlacklists[details.path].entryUsedCount = acceptedCount; this.remoteBlacklists[details.path].entryUsedCount = acceptedCount - duplicateCount;
}; };
/******************************************************************************/ /******************************************************************************/