mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-25 12:01:37 +01:00
9 lines
289 B
JavaScript
9 lines
289 B
JavaScript
|
// for now this is assuming default theme is set to dark
|
||
|
// will probably refactor in the future for much better handling
|
||
|
function loadPreferredTheme() {
|
||
|
if (localStorage.getItem("pref-theme") === "light") {
|
||
|
document.body.classList.remove('dark')
|
||
|
}
|
||
|
}
|
||
|
|
||
|
loadPreferredTheme();
|