mirror of
https://github.com/rottenwheel/revuo-weekly.git
synced 2025-05-06 08:45:34 -04:00
Code cleaned up v1
This commit is contained in:
parent
aaaebfcccc
commit
91ba1bb533
11 changed files with 183 additions and 210 deletions
|
@ -19,10 +19,10 @@ function switchTheme(e) {
|
|||
if (e.target.checked) {
|
||||
document.documentElement.setAttribute('data-theme', 'dark');
|
||||
localStorage.setItem('theme', 'dark');
|
||||
} else {
|
||||
document.documentElement.setAttribute('data-theme', 'light');
|
||||
localStorage.setItem('theme', 'light');
|
||||
}
|
||||
else { document.documentElement.setAttribute('data-theme', 'light');
|
||||
localStorage.setItem('theme', 'light');
|
||||
}
|
||||
}
|
||||
|
||||
toggleSwitch.addEventListener('change', switchTheme, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue