mirror of
https://github.com/PrivSec-dev/privsec.dev.git
synced 2025-05-17 21:50:30 -04:00
Remove inline JS (#17)
This commit is contained in:
parent
b9305c3738
commit
a2fc137ec5
8 changed files with 2056 additions and 2 deletions
9
assets/js/theme.js
Normal file
9
assets/js/theme.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
// 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();
|
Loading…
Add table
Add a link
Reference in a new issue