mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Fix key moments check not working when multiple videos present
This commit is contained in:
@@ -71,7 +71,8 @@ export function getExistingChapters(currentVideoID: VideoID, duration: number):
|
|||||||
|
|
||||||
const chapters: SponsorTime[] = [];
|
const chapters: SponsorTime[] = [];
|
||||||
// .ytp-timed-markers-container indicates that key-moments are present, which should not be divided
|
// .ytp-timed-markers-container indicates that key-moments are present, which should not be divided
|
||||||
if (chaptersBox && !(document.querySelector(".ytp-timed-markers-container")?.childElementCount > 0)) {
|
if (chaptersBox && !(getControls()?.parentElement?.parentElement
|
||||||
|
?.querySelector(".ytp-timed-markers-container")?.childElementCount > 0)) {
|
||||||
let lastSegment: SponsorTime = null;
|
let lastSegment: SponsorTime = null;
|
||||||
const links = chaptersBox.querySelectorAll("ytd-macro-markers-list-item-renderer > a");
|
const links = chaptersBox.querySelectorAll("ytd-macro-markers-list-item-renderer > a");
|
||||||
for (const link of links) {
|
for (const link of links) {
|
||||||
|
|||||||
Reference in New Issue
Block a user