mirror of
https://github.com/PrivSec-dev/privsec.dev.git
synced 2025-05-19 14:40:32 -04:00
Remove inline JS (#17)
This commit is contained in:
parent
5e9f5f924b
commit
04453e8c46
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