mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
9 lines
510 B
JavaScript
9 lines
510 B
JavaScript
;(function () {
|
|
var theme = localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
|
|
var accent = localStorage.getItem('accent') || 'neutral'
|
|
var radius = localStorage.getItem('radius') || 'default'
|
|
if (theme === 'dark') document.documentElement.classList.add('dark')
|
|
if (accent !== 'neutral') document.documentElement.classList.add('accent-' + accent)
|
|
if (radius !== 'default') document.documentElement.classList.add('radius-' + radius)
|
|
})()
|