Replaced "var" with "let"

This commit is contained in:
Sugaryy_ 2023-05-31 13:00:58 +02:00
parent 8831d8c346
commit abf3fe7351

View file

@ -1,6 +1,6 @@
(function () {
var element = document.body;
var theme = localStorage.getItem("colorscheme");
let element = document.body;
let theme = localStorage.getItem("colorscheme");
if (theme === null) {
localStorage.setItem("colorscheme", "dark")
}
@ -10,8 +10,8 @@
})();
function themeToggle() {
var theme = localStorage.getItem("colorscheme");
var element = document.body;
let theme = localStorage.getItem("colorscheme");
let element = document.body;
if (theme === "dark") {
element.classList.toggle("light-mode");
localStorage.setItem("colorscheme", "light")