Skip to content

Commit

Permalink
Remove sections with no lists in "Filter lists" pane
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Mar 4, 2024
1 parent ca432fa commit 0f4e50d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/3p-filters.js
Expand Up @@ -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);

Expand Down

0 comments on commit 0f4e50d

Please sign in to comment.