Final push before rewrite

This commit is contained in:
Jai A
2020-06-28 13:53:03 -07:00
parent d1efd62e7b
commit 1ff2a08d19
5 changed files with 34 additions and 28 deletions

View File

@@ -4,6 +4,13 @@ window.onload = function () {
}
}
function switchThemes() {
let switchTheme = localStorage.getItem("data-theme") === "light" ? "dark" : "light";
localStorage.setItem("data-theme", switchTheme);
document.documentElement.setAttribute("data-theme", switchTheme);
}
function closePopup(e) {
e.parentElement.outerHTML = "";
}