Build 29079805

This commit is contained in:
Renan LE CARO 2025-04-16 09:26:10 +02:00
parent 8e4e67e33b
commit 871a7f9c31
13 changed files with 68 additions and 39 deletions

View file

@ -26,7 +26,7 @@ export function setSettingValue<T>(key: string, value: T) {
cachedSettings[key] = value;
}
}
setInterval(() => {
export function commitSettingsChangesToLocalStorage() {
try {
for (let key of needsSaving) {
localStorage.setItem(key, JSON.stringify(cachedSettings[key]));
@ -35,7 +35,8 @@ setInterval(() => {
} catch (e) {
console.warn(e);
}
}, 500);
}
setInterval(commitSettingsChangesToLocalStorage, 500);
export function getTotalScore() {
return getSettingValue("breakout_71_total_score", 0);