Fix bug in settings loading

This commit is contained in:
2025-10-20 09:33:43 -04:00
parent 670f8d828a
commit d861e91316
2 changed files with 44 additions and 16 deletions

View File

@ -1,16 +1,6 @@
const SCROBBLE_ENDPOINT = "https://life.lab.unbl.ink/?scrobble_url=";
const STOP_ENDPOINT = "https://life.lab.unbl.ink/?action=stop&scrobble_url=";
// Default settings
// *.google.com
// *.annas-archive.org
// *.limetorrents.fun
// gmail.com
// *.duckduckgo.com
// *.ebay.com
// *.amazon.com
// *.boardgamegeek.com
// *.chatgpt.com
const DEFAULT_SETTINGS = {
delay: 7,
blacklist: [
@ -21,12 +11,19 @@ const DEFAULT_SETTINGS = {
"*.chatgpt.com",
"*.ebay.com",
"*.amazon.com",
"*.merrysky.net",
"gemgetter.clearlysharp.com/",
"*.boardgamegeek.com",
"*.duckduckgo.com",
"*.geekgroup.app",
"*.local",
"*.service",
"*.todoist.com",
],
paused: false,
siteDelays: { "readscomisconline.ru": 1 },
};
// Utility: wildcard match
function matchPattern(url, pattern) {
if (pattern.startsWith("*.")) {
const domain = pattern.slice(2);