Test darkmode

This commit is contained in:
cuom1999 2022-11-13 20:39:18 -06:00
parent 187206ba2b
commit c3d86ae28a
3 changed files with 28 additions and 1 deletions

View file

@ -410,4 +410,19 @@ $(function() {
$('#form-lang').submit();
})
$('#logout').on('click', () => $('#logout-form').submit());
$('#nav-darkmode-icon').on('click', function() {
if (localStorage.getItem("darkmode") === "true") {
localStorage.setItem("darkmode", "false");
DarkReader.disable();
}
else {
localStorage.setItem("darkmode", "true");
DarkReader.enable();
}
})
});
if (localStorage.getItem("darkmode") === "true") {
DarkReader.enable();
}