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.sort();
|
||||
const highlyGenerics = Array.from(this.highlyGeneric.simple.dict);
|
||||
highlyGenerics.push(Array.from(this.highlyGeneric.complex.dict));
|
||||
highlyGenerics.sort();
|
||||
const highlyGenerics = Array.from(this.highlyGeneric.simple.dict).sort();
|
||||
highlyGenerics.push(...Array.from(this.highlyGeneric.complex.dict).sort());
|
||||
return [
|
||||
'Cosmetic Filtering Engine internals:',
|
||||
`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(`+ generichide exclusions (${network.generichideExclusions.length}): ${JSON.stringify(network.generichideExclusions, replacer, 2)}`);
|
||||
out.push(`+ Cosmetic filters: ${result.specificCosmetic.size}`);
|
||||
for ( const details of result.specificCosmetic ) {
|
||||
out.push(` ${JSON.stringify(details)}`);
|
||||
if ( result.specificCosmetic ) {
|
||||
out.push(`+ Cosmetic filters: ${result.specificCosmetic.size}`);
|
||||
for ( const details of result.specificCosmetic ) {
|
||||
out.push(` ${JSON.stringify(details)}`);
|
||||
}
|
||||
} else {
|
||||
out.push(' Cosmetic filters: 0');
|
||||
}
|
||||
|
||||
callback(out.join('\n'));
|
||||
});
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue