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'),
|
previousFrame: clickElement('.prev-frame'),
|
||||||
nextFrame: clickElement('.next-frame'),
|
nextFrame: clickElement('.next-frame'),
|
||||||
returnBegin: () => {
|
returnBegin: () => {
|
||||||
if (unsafeWindow.player) {
|
if (!unsafeWindow.player) {
|
||||||
unsafeWindow.player.play()
|
return
|
||||||
setTimeout(() => unsafeWindow.player.seek(0))
|
|
||||||
}
|
}
|
||||||
|
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 } = {
|
const defaultBindings: { [action in keyof typeof actions]: string } = {
|
||||||
@ -243,11 +250,11 @@ if (supportedUrls.some(url => document.URL.startsWith(url))) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
;(async () => {
|
;(async () => {
|
||||||
const { loadKeyBindings } = await import('./key-bindings')
|
const { loadKeyBindings } = await import('./key-bindings')
|
||||||
config = loadKeyBindings(parseBindings(
|
config = loadKeyBindings(parseBindings(
|
||||||
{ ...defaultBindings, ...settings.customKeyBindings }
|
{ ...defaultBindings, ...settings.customKeyBindings }
|
||||||
))
|
))
|
||||||
})()
|
})()
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user