mirror of https://github.com/gorhill/uBlock.git
Truncate support information when too many lists are added
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1852
This commit is contained in:
parent
4d482f9133
commit
99882cacd0
|
@ -1304,6 +1304,13 @@ const getSupportData = async function() {
|
|||
}
|
||||
if ( Object.keys(addedListset).length === 0 ) {
|
||||
addedListset = undefined;
|
||||
} else if ( Object.keys(addedListset).length > 20 ) {
|
||||
const added = Object.keys(addedListset);
|
||||
const truncated = added.slice(20);
|
||||
for ( const key of truncated ) {
|
||||
delete addedListset[key];
|
||||
}
|
||||
addedListset[`[${truncated.length} lists not shown]`] = '[too many]';
|
||||
}
|
||||
if ( Object.keys(removedListset).length === 0 ) {
|
||||
removedListset = undefined;
|
||||
|
|
Loading…
Reference in New Issue