mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
18 lines
475 B
TypeScript
18 lines
475 B
TypeScript
import { select } from '@/core/spin-query'
|
|
|
|
export const touchLiveMiniPlayer = async (enable: boolean) => {
|
|
const player = (await select('.live-player-ctnr')) as HTMLDivElement
|
|
if (!player) {
|
|
console.warn('mini player touch move: player not found')
|
|
return
|
|
}
|
|
const { enableTouchMove, disableTouchMove } = await import('./touch-move')
|
|
if (enable) {
|
|
enableTouchMove(player, {
|
|
minMoveDistance: 10,
|
|
})
|
|
} else {
|
|
disableTouchMove(player)
|
|
}
|
|
}
|