mirror of https://github.com/gorhill/uBlock.git
Fix dumping of CFE internals when no cosmetic filters present
This commit is contained in:
parent
780383faef
commit
0a18f75897
|
@ -961,9 +961,8 @@ FilterContainer.prototype.dump = function() {
|
||||||
lowlyGenerics.push(...selectors.split(',\n'));
|
lowlyGenerics.push(...selectors.split(',\n'));
|
||||||
}
|
}
|
||||||
lowlyGenerics.sort();
|
lowlyGenerics.sort();
|
||||||
const highlyGenerics = Array.from(this.highlyGeneric.simple.dict);
|
const highlyGenerics = Array.from(this.highlyGeneric.simple.dict).sort();
|
||||||
highlyGenerics.push(Array.from(this.highlyGeneric.complex.dict));
|
highlyGenerics.push(...Array.from(this.highlyGeneric.complex.dict).sort());
|
||||||
highlyGenerics.sort();
|
|
||||||
return [
|
return [
|
||||||
'Cosmetic Filtering Engine internals:',
|
'Cosmetic Filtering Engine internals:',
|
||||||
`specific: ${this.specificFilters.size}`,
|
`specific: ${this.specificFilters.size}`,
|
||||||
|
|
|
@ -240,11 +240,14 @@ const onMessage = function(request, sender, callback) {
|
||||||
);
|
);
|
||||||
out.push(`+ Unsupported filters (${bad.length}): ${JSON.stringify(bad, replacer, 2)}`);
|
out.push(`+ Unsupported filters (${bad.length}): ${JSON.stringify(bad, replacer, 2)}`);
|
||||||
out.push(`+ generichide exclusions (${network.generichideExclusions.length}): ${JSON.stringify(network.generichideExclusions, replacer, 2)}`);
|
out.push(`+ generichide exclusions (${network.generichideExclusions.length}): ${JSON.stringify(network.generichideExclusions, replacer, 2)}`);
|
||||||
out.push(`+ Cosmetic filters: ${result.specificCosmetic.size}`);
|
if ( result.specificCosmetic ) {
|
||||||
for ( const details of result.specificCosmetic ) {
|
out.push(`+ Cosmetic filters: ${result.specificCosmetic.size}`);
|
||||||
out.push(` ${JSON.stringify(details)}`);
|
for ( const details of result.specificCosmetic ) {
|
||||||
|
out.push(` ${JSON.stringify(details)}`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.push(' Cosmetic filters: 0');
|
||||||
}
|
}
|
||||||
|
|
||||||
callback(out.join('\n'));
|
callback(out.join('\n'));
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue