mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-01 16:49:39 +02:00
Fix regression breaking import of file://
lists
Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3199
This commit is contained in:
parent
d4a99a98f4
commit
c223a8cd39
@ -559,21 +559,20 @@ const selectFilterLists = async ( ) => {
|
|||||||
const textarea = qs$('#lists .listEntry[data-role="import"].expanded textarea');
|
const textarea = qs$('#lists .listEntry[data-role="import"].expanded textarea');
|
||||||
if ( textarea === null ) { return ''; }
|
if ( textarea === null ) { return ''; }
|
||||||
const lists = listsetDetails.available;
|
const lists = listsetDetails.available;
|
||||||
const lines = textarea.value.split(/\s+\n|\s+/);
|
const lines = textarea.value.split(/\s+/);
|
||||||
const after = [];
|
const after = [];
|
||||||
for ( const line of lines ) {
|
for ( const line of lines ) {
|
||||||
|
after.push(line);
|
||||||
if ( /^https?:\/\//.test(line) === false ) { continue; }
|
if ( /^https?:\/\//.test(line) === false ) { continue; }
|
||||||
for ( const [ listkey, list ] of Object.entries(lists) ) {
|
for ( const [ listkey, list ] of Object.entries(lists) ) {
|
||||||
if ( list.content !== 'filters' ) { continue; }
|
if ( list.content !== 'filters' ) { continue; }
|
||||||
if ( list.contentURL === undefined ) { continue; }
|
if ( list.contentURL === undefined ) { continue; }
|
||||||
if ( list.contentURL.includes(line) === false ) {
|
if ( list.contentURL.includes(line) === false ) { continue; }
|
||||||
after.push(line);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const groupkey = list.group2 || list.group;
|
const groupkey = list.group2 || list.group;
|
||||||
const listEntry = qs$(`[data-key="${groupkey}"] [data-key="${listkey}"]`);
|
const listEntry = qs$(`[data-key="${groupkey}"] [data-key="${listkey}"]`);
|
||||||
if ( listEntry === null ) { break; }
|
if ( listEntry === null ) { break; }
|
||||||
toggleFilterList(listEntry, true);
|
toggleFilterList(listEntry, true);
|
||||||
|
after.pop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user