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