Bilibili-Evolved/registry/lib/components/style/simplify/live/skin.ts
2022-06-11 19:44:01 +08:00

13 lines
394 B
TypeScript

import { addComponentListener } from '@/core/settings'
import { select } from '@/core/spin-query'
export const setupSkinSimplify = async () => {
addComponentListener('simplifyLiveroom.switch-skin', async (disable: boolean) => {
const skinCss = await select('#skin-css') as HTMLStyleElement
if (!skinCss) {
return
}
skinCss.media = disable ? 'none' : 'all'
}, true)
}