Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/page/Components/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

// check if val matches `match patterns`, if not, return a warning
const re = /^(http:|https:|\*:)\/\/((?:\*\.)?(?:[a-z0-9-]+\.)+(?:[a-z0-9]+)|\*\.[a-z]+|\*|[a-z0-9]+)(\/[^\s]*)$/;
blacklistError = false;
for (const v of val) {
if (re.exec(v) === null) {
blacklistError = true;
log.add(`Invalid match pattern: ${v}`, "error", true);
}
}
if (blacklistError) return console.warn("Global exclude includes invalid match patterns");
blacklistError = false;

// compare blacklist input to saved blacklist
if ([...val].sort().toString() !== [...$settings.blacklist].sort().toString()) {
Expand Down