mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
17 lines
425 B
TypeScript
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,
|
|
)
|
|
}
|