diff --git a/js/cosmetic-filtering.js b/js/cosmetic-filtering.js index 4b7d2e9e1..e77d8b295 100644 --- a/js/cosmetic-filtering.js +++ b/js/cosmetic-filtering.js @@ -558,11 +558,10 @@ FilterContainer.prototype.addGenericSelector = function(parsed) { } if ( entries[parsed.suffix] === undefined ) { entries[parsed.suffix] = true; - this.acceptedCount += 1; } else { this.duplicateCount += 1; } - return true; + this.acceptedCount += 1; }; /******************************************************************************/ @@ -581,13 +580,12 @@ FilterContainer.prototype.addHostnameSelector = function(hostname, parsed) { if ( entry === undefined ) { entry = entries[hostname] = {}; entry[parsed.suffix] = true; - this.acceptedCount += 1; } else if ( entry[parsed.suffix] === undefined ) { entry[parsed.suffix] = true; - this.acceptedCount += 1; } else { this.duplicateCount += 1; } + this.acceptedCount += 1; }; /******************************************************************************/ @@ -601,13 +599,12 @@ FilterContainer.prototype.addEntitySelector = function(hostname, parsed) { if ( entry === undefined ) { entry = entries[entity] = {}; entry[parsed.suffix] = true; - this.acceptedCount += 1; } else if ( entry[parsed.suffix] === undefined ) { entry[parsed.suffix] = true; - this.acceptedCount += 1; } else { this.duplicateCount += 1; } + this.acceptedCount += 1; }; /******************************************************************************/ diff --git a/js/storage.js b/js/storage.js index b7e17c630..d8da57154 100644 --- a/js/storage.js +++ b/js/storage.js @@ -411,8 +411,8 @@ duplicateCount = netFilteringEngine.duplicateCount + cosmeticFilteringEngine.duplicateCount - duplicateCount; acceptedCount = netFilteringEngine.acceptedCount + cosmeticFilteringEngine.acceptedCount - acceptedCount; - this.remoteBlacklists[details.path].entryCount = acceptedCount + duplicateCount; - this.remoteBlacklists[details.path].entryUsedCount = acceptedCount; + this.remoteBlacklists[details.path].entryCount = acceptedCount; + this.remoteBlacklists[details.path].entryUsedCount = acceptedCount - duplicateCount; }; /******************************************************************************/