mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
hotfix(safari): Safari fix for window
This commit is contained in:
parent
28c6f5144c
commit
19b7ce51a4
@ -16,6 +16,7 @@ const switchTheme = (e) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (window) {
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
// Darkmode toggle
|
||||
const toggleSwitch = document.querySelector('#darkmode-toggle')
|
||||
@ -27,3 +28,5 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||
toggleSwitch.checked = true
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user