mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-09-26 22:49:14 +08:00
Restore double click fullscreen (#5095)
This commit is contained in:
parent
24714b77a7
commit
a5283105b0
@ -32,7 +32,7 @@
|
||||
|
||||
**注意事项**
|
||||
- **⚠ 使用正式版 (GitHub 源) 和预览版须翻墙.**
|
||||
- 默认不预装任何组件, 需要在按[设置](#设置)中的说明添加感兴趣的功能; 默认会屏蔽双击全屏, 如有需要可以安装 `双击全屏` 组件来恢复.
|
||||
- 默认不预装任何组件, 需要在按[设置](#设置)中的说明添加感兴趣的功能.
|
||||
- 这个是一个综合性的脚本, 如果只是想下载视频建议去 [GreasyFork](https://greasyfork.org/zh-CN/scripts/by-site/bilibili.com) 找个更专业的.
|
||||
- 对性能有较大影响, 详见[配置要求](#配置).
|
||||
- 默认不对未登录的状态做适配.
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { attributes } from '@/core/observer'
|
||||
import { select } from '@/core/spin-query'
|
||||
import { playerReady, preventEvent } from '@/core/utils'
|
||||
import { playerReady } from '@/core/utils'
|
||||
import { createPlayerModeChangeEvent, PlayerMode } from './events'
|
||||
|
||||
/** 播放器模式标记同步 */
|
||||
@ -36,19 +36,8 @@ const playerModePolyfill = async () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
/** 移除 3.x 的双击全屏.
|
||||
* 如果以后视频区兼容了弹幕点赞层, 需要将双击全屏组件更换为阻止双击全屏, 并取消对此函数的使用.
|
||||
*/
|
||||
const doubleClickPolyfill = async () => {
|
||||
const layer = (await select('.bpx-player-video-perch')) as HTMLElement
|
||||
if (!layer) {
|
||||
return
|
||||
}
|
||||
preventEvent(layer, 'dblclick')
|
||||
}
|
||||
|
||||
/** 番剧 & 视频播放器 (BPX) 通用 polyfill */
|
||||
export const bpxPlayerPolyfill = lodash.once(async () => {
|
||||
playerModePolyfill()
|
||||
doubleClickPolyfill()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user