mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 05:57:07 +03:00
Improved behavior of next chapter keybind with overlap
This commit is contained in:
@@ -2237,7 +2237,7 @@ function updateActiveSegment(currentTime: number): void {
|
||||
}
|
||||
|
||||
function nextChapter(): void {
|
||||
const chapters = previewBar.chapterGroups?.filter((time) => [ActionType.Chapter, null].includes(time.actionType));
|
||||
const chapters = previewBar.unfilteredChapterGroups?.filter((time) => [ActionType.Chapter, null].includes(time.actionType));
|
||||
if (!chapters || chapters.length <= 0) return;
|
||||
|
||||
lastNextChapterKeybind.time = video.currentTime;
|
||||
@@ -2258,7 +2258,7 @@ function previousChapter(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
const chapters = previewBar.chapterGroups?.filter((time) => [ActionType.Chapter, null].includes(time.actionType));
|
||||
const chapters = previewBar.unfilteredChapterGroups?.filter((time) => [ActionType.Chapter, null].includes(time.actionType));
|
||||
if (!chapters || chapters.length <= 0) {
|
||||
video.currentTime = 0;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user