diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-10 18:18:32 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-10 18:18:32 +0800 |
| commit | 165abe4eaf4597d7b8e64ec245bd2036a3ec02df (patch) | |
| tree | 67c085ef51d76d66fafa48c50ce18703cf1cc7e8 /layouts/_partials | |
| parent | 526216eaab32a9ca05662eaaba20660b94da904e (diff) | |
refactor: use existence instead of boolean string in local storage
Umami needs `umami.disabled` value to be `1` to actually disable it. Also, local storage can't store booleans, hence 'true' and 'false' are stored as strings, which is dumb. Just remove the item when it needs to be set false.
Diffstat (limited to 'layouts/_partials')
| -rw-r--r-- | layouts/_partials/components/back-to-top.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_partials/components/back-to-top.html b/layouts/_partials/components/back-to-top.html index ea990f93..bf094d5d 100644 --- a/layouts/_partials/components/back-to-top.html +++ b/layouts/_partials/components/back-to-top.html @@ -15,7 +15,7 @@ <script> // hide Batrick if set -if (localStorage.getItem('geedeapro.ui.hideBatrick') === 'true') { +if (localStorage.getItem('geedeapro.ui.hideBatrick')) { document.getElementById('back2top').classList.add('hidden'); } else { // Batrick functionality |
