1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Group lists with unknown group to special section

Related issue:
https://old.reddit.com/r/uBlockOrigin/comments/1b6tad0
This commit is contained in:
Raymond Hill 2024-03-05 08:02:55 -05:00
parent 24d94e559d
commit 04fead8d8a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -229,6 +229,7 @@ const renderFilterLists = ( ) => {
'social',
'annoyances',
'regions',
'unknown',
'custom'
];
for ( const key of groupKeys ) {
@ -238,9 +239,11 @@ const renderFilterLists = ( ) => {
};
}
for ( const [ listkey, listDetails ] of Object.entries(response.available) ) {
const groupkey = listDetails.group;
let groupkey = listDetails.group;
if ( listTree.hasOwnProperty(groupkey) === false ) {
groupkey = 'unknown';
}
const groupDetails = listTree[groupkey];
if ( groupDetails === undefined ) { continue; }
if ( listDetails.parent !== undefined ) {
let lists = groupDetails.lists;
for ( const parent of listDetails.parent.split('|') ) {