summaryrefslogtreecommitdiff
path: root/layouts/_default/baseof.html
diff options
context:
space:
mode:
authorleiyu3 <s444814187@gmail.com>2025-07-17 15:04:31 -0400
committerleiyu3 <s444814187@gmail.com>2025-07-17 15:04:31 -0400
commit6ade49b8a453fde18ee054021006ad8be6361865 (patch)
tree12414ab83c385e8d41e6dfb725428980a5f46c93 /layouts/_default/baseof.html
parent04c5ca73b6deb1d051cd7e87656cd0a047813d59 (diff)
downloadletsworship-6ade49b8a453fde18ee054021006ad8be6361865.tar.gz
letsworship-6ade49b8a453fde18ee054021006ad8be6361865.zip
some fixes
Diffstat (limited to 'layouts/_default/baseof.html')
-rw-r--r--layouts/_default/baseof.html14
1 files changed, 13 insertions, 1 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index fa1b3b7..d505868 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -126,7 +126,19 @@ document.addEventListener("DOMContentLoaded", () => {
126document.addEventListener("DOMContentLoaded", () => { 126document.addEventListener("DOMContentLoaded", () => {
127 const toggle = document.getElementById("toggle-chords"); 127 const toggle = document.getElementById("toggle-chords");
128 128
129 toggle?.addEventListener("change", () => { 129 if (!toggle) return;
130
131 // ✅ Restore saved state
132 const savedState = localStorage.getItem("chords-toggle");
133 if (savedState !== null) {
134 const isChecked = savedState === "true";
135 toggle.checked = isChecked;
136 document.body.classList.toggle("hide-chords", !isChecked);
137 }
138
139 // ✅ Save on change
140 toggle.addEventListener("change", () => {
141 localStorage.setItem("chords-toggle", toggle.checked);
130 document.body.classList.toggle("hide-chords", !toggle.checked); 142 document.body.classList.toggle("hide-chords", !toggle.checked);
131 }); 143 });
132}); 144});