Hide theme switcher by default, only show it if javascript is enabled

This commit is contained in:
Julien Dessaux 2023-01-28 14:47:03 +01:00
parent 6ad4e164af
commit 9ab3804aec
Signed by: adyxax
GPG key ID: F92E51B86E07177E
2 changed files with 4 additions and 1 deletions

View file

@ -8,7 +8,9 @@
const themeName = localStorage.getItem('theme');
if (themeName) {
document.documentElement.className = themeName;
document.getElementById('themes').value = themeName;
const elt = document.getElementById('themes');
elt.style.display = "block";
elt.value = themeName;
}
})();
</script>