summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/js/settings.js5
-rw-r--r--layouts/_partials/components/back-to-top.html2
2 files changed, 5 insertions, 2 deletions
diff --git a/assets/js/settings.js b/assets/js/settings.js
index 053786d6..52675143 100644
--- a/assets/js/settings.js
+++ b/assets/js/settings.js
@@ -96,7 +96,10 @@
// add event listener to checkbox
element.addEventListener('change', () => {
- localStorage.setItem(checkboxOption.storage, element.checked);
+ if (element.checked)
+ localStorage.setItem(checkboxOption.storage, 1);
+ else
+ localStorage.removeItem(checkboxOption.storage);
});
// append checkbox and label to container
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