diff options
author | elioat <elioat@tilde.institute> | 2024-10-25 22:23:28 -0400 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-10-25 22:23:28 -0400 |
commit | 84d5cfc2fc58973060e9893e1aff4175ca41eba4 (patch) | |
tree | c22d07696e819e55122cb44dac05366190912539 /html | |
parent | 543efafc4374c81f9a6aaf3d5110527267515a53 (diff) | |
download | tour-84d5cfc2fc58973060e9893e1aff4175ca41eba4.tar.gz |
*
Diffstat (limited to 'html')
-rw-r--r-- | html/broughlike/index.html | 11 |
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'; } |