mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-03-01 12:29:40 +08:00
9 lines
308 B
TypeScript
9 lines
308 B
TypeScript
export const changeAccentColor = (color: string) => {
|
|
document.body.setAttribute('data-accent-color', color)
|
|
}
|
|
|
|
const stateString = localStorage.getItem('state')
|
|
const stateInLocalStorage = stateString ? JSON.parse(stateString) : {}
|
|
|
|
changeAccentColor(stateInLocalStorage?.settings?.accentColor || 'blue')
|