privacyguides.org/assets/js/applytheme.js
2019-08-31 15:30:53 -07:00

7 lines
291 B
JavaScript

if (localStorage.getItem("colorScheme") === "dark") {
document.querySelector("#dark-css").removeAttribute("media"); // Set dark theme
}
else if (localStorage.getItem("colorScheme") === "light") {
document.querySelector("#dark-css").setAttribute("media", "invalid"); // Set light theme
}