8 lines
244 B
JavaScript
8 lines
244 B
JavaScript
try {
|
|
const theme = localStorage.getItem('syncova-theme') || 'system'
|
|
document.documentElement.classList.toggle(
|
|
'dark',
|
|
theme === 'dark' || (theme === 'system' && matchMedia('(prefers-color-scheme: dark)').matches),
|
|
)
|
|
} catch {}
|