1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 10:09:38 +02:00

for debugging purpose

This commit is contained in:
gorhill 2015-01-31 18:34:46 -05:00
parent fb59756bc6
commit e2b3e28762
2 changed files with 7 additions and 3 deletions

View File

@ -617,6 +617,7 @@ FilterContainer.prototype.addGenericSelector = function(parsed) {
if ( entries[parsed.suffix] === undefined ) {
entries[parsed.suffix] = true;
} else {
//console.log('cosmetic-filtering.js > FilterContainer.addGenericSelector(): duplicate filter "%s"', parsed.suffix);
this.duplicateCount += 1;
}
this.acceptedCount += 1;
@ -641,6 +642,7 @@ FilterContainer.prototype.addHostnameSelector = function(hostname, parsed) {
} else if ( entry[parsed.suffix] === undefined ) {
entry[parsed.suffix] = true;
} else {
//console.log('cosmetic-filtering.js > FilterContainer.addHostnameSelector(): duplicate filter "%s"', parsed.suffix);
this.duplicateCount += 1;
}
this.acceptedCount += 1;
@ -660,6 +662,7 @@ FilterContainer.prototype.addEntitySelector = function(hostname, parsed) {
} else if ( entry[parsed.suffix] === undefined ) {
entry[parsed.suffix] = true;
} else {
//console.log('cosmetic-filtering.js > FilterContainer.addEntitySelector(): duplicate filter "%s"', parsed.suffix);
this.duplicateCount += 1;
}
this.acceptedCount += 1;

View File

@ -1553,11 +1553,11 @@ FilterContainer.prototype.makeCategoryKey = function(category) {
/******************************************************************************/
FilterContainer.prototype.add = function(s) {
FilterContainer.prototype.add = function(raw) {
// ORDER OF TESTS IS IMPORTANT!
// Ignore empty lines
s = s.trim();
var s = raw.trim();
if ( s.length === 0 ) {
return false;
}
@ -1578,7 +1578,7 @@ FilterContainer.prototype.add = function(s) {
// Ignore filters with unsupported options
if ( parsed.unsupported ) {
this.rejectedCount += 1;
// console.log('µBlock> abp-filter.js/FilterContainer.add(): unsupported filter "%s"', s);
//console.log('static-net-filtering.js > FilterContainer.add(): unsupported filter "%s"', raw);
return false;
}
@ -1606,6 +1606,7 @@ FilterContainer.prototype.add = function(s) {
}
if ( this.duplicates[s] ) {
//console.log('static-net-filtering.js > FilterContainer.add(): duplicate filter "%s"', raw);
this.duplicateCount++;
return false;
}