diff options
| Commit | a3b5ec81e60a3185d6426c2b33b5dae2b5866b45 (patch) | |
|---|---|---|
| Author | 2025-12-25 18:14:17 +0200 | |
| Committer | 2025-12-25 18:14:17 +0200 | |
| Files | c9def39ebbc67e8481ba988115beeb2a8d77d4b6 /src/scripts | |
| syndamia.com-a3b5ec81e60a3185d6426c2b33b5dae2b5866b45.tar syndamia.com-a3b5ec81e60a3185d6426c2b33b5dae2b5866b45.tar.gz syndamia.com-a3b5ec81e60a3185d6426c2b33b5dae2b5866b45.zip | ||
| Parent | 2d0859936833ea72aad40bd7165e96a792ca5a49 (diff) | |
feat(snow): Improve implementation
- Simplify css
- Remove erronious semicolumns (which aren't a problem in firefox, but
are in chrome)
- Fix bad button functionality of no storage property is set
1 files changed, 5 insertions, 5 deletions
| -rw-r--r-- | src/scripts/snow.js | 10 |
diff --git a/src/scripts/snow.js b/src/scripts/snow.js index a7eca9a..54d581b 100644 --- a/src/scripts/snow.js +++ b/src/scripts/snow.js @@ -24,13 +24,13 @@ if (enableSnow) { snowBtn.onclick = function() { snowCont.classList.toggle('noSnow'); - if (localStorage.getItem('snow') !== 'on') { - localStorage.setItem('snow', 'on'); - snowEnabledLabel.innerText = 'Remove'; + if (localStorage.getItem('snow') !== 'off') { + localStorage.setItem('snow', 'off'); + snowEnabledLabel.innerText = 'Add'; } else { - snowEnabledLabel.innerText = 'Add'; - localStorage.setItem('snow', 'off'); + localStorage.setItem('snow', 'on'); + snowEnabledLabel.innerText = 'Remove'; } } } |