mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
fix: 处理lint检查报错
This commit is contained in:
parent
f76c3c442d
commit
6330e00be4
@ -12,7 +12,7 @@ const playerModePolyfill = async () => {
|
||||
}
|
||||
let lastScreen = 'normal' as PlayerMode
|
||||
attributes(bpxContainer, () => {
|
||||
const dataScreen = bpxContainer.getAttribute('data-screen')
|
||||
const dataScreen = bpxContainer.getAttribute('data-screen') as PlayerMode
|
||||
const prefix = 'player-mode-'
|
||||
const enumList = ['normal', 'wide', 'web', 'full'].map(it => `${prefix}${it}`)
|
||||
|
||||
@ -21,7 +21,7 @@ const playerModePolyfill = async () => {
|
||||
|
||||
// add class
|
||||
document.body.classList.add(dataScreen !== 'normal' ? `${prefix}${dataScreen}` : '')
|
||||
|
||||
|
||||
if (dataScreen !== lastScreen) {
|
||||
window.dispatchEvent(playerModeChange(dataScreen))
|
||||
lastScreen = dataScreen
|
||||
|
||||
Loading…
Reference in New Issue
Block a user