mirror of https://github.com/gorhill/uBlock.git
Remove sections with no lists in "Filter lists" pane
Related feedback: https://github.com/uBlockOrigin/uBlock-issues/issues/3154#issuecomment-1975413427
This commit is contained in:
parent
ca432fa5d2
commit
0f4e50db07
|
@ -254,6 +254,14 @@ const renderFilterLists = ( ) => {
|
|||
groupDetails.lists[listkey] = listDetails;
|
||||
}
|
||||
}
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/3154#issuecomment-1975413427
|
||||
// Remove empty sections
|
||||
for ( const groupkey of groupKeys ) {
|
||||
const lists = listTree[groupkey].lists;
|
||||
if ( Object.keys(lists).length !== 0 ) { continue; }
|
||||
delete listTree[groupkey];
|
||||
}
|
||||
|
||||
const listEntries = createListEntries('root', listTree);
|
||||
qs$('#lists .listEntries').replaceWith(listEntries);
|
||||
|
||||
|
|
Loading…
Reference in New Issue