web-player: dedupe queue, stop at end of queue, open queue once and harden localStorage

This commit is contained in:
2026-09-24 04:59:28 +02:00
parent 3e546d4a1e
commit 906f38140a
7 changed files with 120 additions and 38 deletions
+15
View File
@@ -0,0 +1,15 @@
export function readStorage(key: string, fallback: string | null = null): string | null {
try {
return localStorage.getItem(key) ?? fallback;
} catch {
return fallback;
}
}
export function writeStorage(key: string, value: string): void {
try {
localStorage.setItem(key, value);
} catch {
/* localStorage unavailable (private mode, quota) — the value just won't persist */
}
}