about summary refs log tree commit diff stats
path: root/html
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-10-25 22:23:28 -0400
committerelioat <elioat@tilde.institute>2024-10-25 22:23:28 -0400
commit84d5cfc2fc58973060e9893e1aff4175ca41eba4 (patch)
treec22d07696e819e55122cb44dac05366190912539 /html
parent543efafc4374c81f9a6aaf3d5110527267515a53 (diff)
downloadtour-84d5cfc2fc58973060e9893e1aff4175ca41eba4.tar.gz
*
Diffstat (limited to 'html')
-rw-r--r--html/broughlike/index.html11
1 files changed, 10 insertions, 1 deletions
diff --git a/html/broughlike/index.html b/html/broughlike/index.html
index cebc5cf..0a732c5 100644
--- a/html/broughlike/index.html
+++ b/html/broughlike/index.html
@@ -472,9 +472,18 @@
             return [];
         }
 
-        let combatAnimationEnabled = true;
+        let combatAnimationEnabled = localStorage.getItem('combatAnimationEnabled');
+        if (combatAnimationEnabled === null) {
+            combatAnimationEnabled = true; // default to on...is that a good idea?
+            localStorage.setItem('combatAnimationEnabled', combatAnimationEnabled);
+        } else {
+            combatAnimationEnabled = combatAnimationEnabled === 'true';
+        }
+        document.getElementById('toggleShake').textContent = combatAnimationEnabled ? 'Turn Shake Off' : 'Turn Shake On';
+
         function toggleShake() {
             combatAnimationEnabled = !combatAnimationEnabled;
+            localStorage.setItem('combatAnimationEnabled', combatAnimationEnabled);
             document.getElementById('toggleShake').textContent = combatAnimationEnabled ? 'Turn Shake Off' : 'Turn Shake On';
         }