about summary refs log tree commit diff stats
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
parent543efafc4374c81f9a6aaf3d5110527267515a53 (diff)
downloadtour-84d5cfc2fc58973060e9893e1aff4175ca41eba4.tar.gz
*
-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';
         }
 
ref='#n133'>133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187