mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
fix(return-begin): 修复 toast 时间显示
This commit is contained in:
parent
3801e06ee1
commit
5164d69c90
@ -202,10 +202,17 @@ if (supportedUrls.some(url => document.URL.startsWith(url))) {
|
||||
previousFrame: clickElement('.prev-frame'),
|
||||
nextFrame: clickElement('.next-frame'),
|
||||
returnBegin: () => {
|
||||
if (unsafeWindow.player) {
|
||||
unsafeWindow.player.play()
|
||||
setTimeout(() => unsafeWindow.player.seek(0))
|
||||
if (!unsafeWindow.player) {
|
||||
return
|
||||
}
|
||||
unsafeWindow.player.play()
|
||||
setTimeout(() => {
|
||||
unsafeWindow.player.seek(0)
|
||||
const toastText = dq(".bilibili-player-video-toast-bottom .bilibili-player-video-toast-item:first-child .bilibili-player-video-toast-item-text span:nth-child(2)")
|
||||
if (toastText) {
|
||||
toastText.textContent = " 00:00"
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
const defaultBindings: { [action in keyof typeof actions]: string } = {
|
||||
@ -243,11 +250,11 @@ if (supportedUrls.some(url => document.URL.startsWith(url))) {
|
||||
}
|
||||
|
||||
;(async () => {
|
||||
const { loadKeyBindings } = await import('./key-bindings')
|
||||
config = loadKeyBindings(parseBindings(
|
||||
{ ...defaultBindings, ...settings.customKeyBindings }
|
||||
))
|
||||
})()
|
||||
const { loadKeyBindings } = await import('./key-bindings')
|
||||
config = loadKeyBindings(parseBindings(
|
||||
{ ...defaultBindings, ...settings.customKeyBindings }
|
||||
))
|
||||
})()
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user