diff options
Diffstat (limited to 'template.html')
| -rw-r--r-- | template.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/template.html b/template.html index beefe84..eca5f3e 100644 --- a/template.html +++ b/template.html @@ -82,8 +82,11 @@ $endif$ $body$ <script> -document.querySelector("#dark-mode-btn").tagName = "button"; -document.querySelector("#dark-mode-btn").innerHTML = "🌓"; +const b = document.createElement("button"); +b.innerHTML = "🌓"; +b.setAttribute("id", "dark-mode-btn"); +b.setAttribute("aria-label", "Toggle dark mode"); +document.querySelector("#dark-mode-btn").replaceWith(b); const initialManualColorScheme = localStorage.getItem("colorScheme"); // If null, no manual color scheme is set |
