mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 17:49:39 +02:00
Discard duplicate lines when merging imported directives
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/tqwl4s/import_of_the_reliable_sites/
This commit is contained in:
parent
ecfe47a1ef
commit
0d6a459b60
@ -178,9 +178,11 @@ const handleImportFilePicker = function() {
|
||||
const fr = new FileReader();
|
||||
fr.onload = ev => {
|
||||
if ( ev.type !== 'load' ) { return; }
|
||||
setEditorText(
|
||||
[ getEditorText().trim(), fr.result.trim() ].join('\n').trim()
|
||||
const content = uBlockDashboard.mergeNewLines(
|
||||
getEditorText().trim(),
|
||||
fr.result.trim()
|
||||
);
|
||||
setEditorText(content);
|
||||
};
|
||||
fr.readAsText(file);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user