mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 15:07:02 +03:00
Add option to hide autogenerated chapters by YouTube
This commit is contained in:
@@ -25,7 +25,7 @@ import SubmissionNotice from "./render/SubmissionNotice";
|
||||
import { Message, MessageResponse, VoteResponse } from "./messageTypes";
|
||||
import { SkipButtonControlBar } from "./js-components/skipButtonControlBar";
|
||||
import { getStartTimeFromUrl } from "./utils/urlParser";
|
||||
import { getControls, getExistingChapters, getHashParams, isPlayingPlaylist, isVisible } from "./utils/pageUtils";
|
||||
import { getControls, getExistingChapters, getHashParams, hasAutogeneratedChapters, isPlayingPlaylist, isVisible } from "./utils/pageUtils";
|
||||
import { CategoryPill } from "./render/CategoryPill";
|
||||
import { AnimationUtils } from "../maze-utils/src/animationUtils";
|
||||
import { GenericUtils } from "./utils/genericUtils";
|
||||
@@ -1287,7 +1287,13 @@ function importExistingChapters(wait: boolean) {
|
||||
existingChaptersImported = true;
|
||||
updatePreviewBar();
|
||||
}
|
||||
}).catch(() => { importingChaptersWaiting = false; }); // eslint-disable-line @typescript-eslint/no-empty-function
|
||||
}).catch(() => { importingChaptersWaiting = false; });
|
||||
|
||||
if (!Config.config.showAutogeneratedChapters) {
|
||||
waitFor(() => hasAutogeneratedChapters(), wait ? 15000 : 0, 400).then(() => {
|
||||
updateActiveSegment(getCurrentTime());
|
||||
}).catch(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user