mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
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
1 changed files with 7 additions and 0 deletions
|
|
@ -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 a new issue