Bilibili-Evolved/registry/lib/components/style/simplify/live/skin.ts
2022-10-12 23:27:58 +08:00

17 lines
425 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,
)
}