Add option to disable segment names beside timestamp in video player

This commit is contained in:
Ajay
2022-09-24 22:29:07 -04:00
parent bb8975e93a
commit da35e889f2
6 changed files with 24 additions and 7 deletions

View File

@@ -717,7 +717,8 @@ class PreviewBar {
}
updateChapterText(segments: SponsorTime[], submittingSegments: SponsorTime[], currentTime: number): void {
if ((!segments || segments.length <= 0) && submittingSegments?.length <= 0) {
if (!Config.config.showSegmentNameInChapterBar
|| ((!segments || segments.length <= 0) && submittingSegments?.length <= 0)) {
const chaptersContainer = this.getChaptersContainer();
const chapterButton = this.getChapterButton(chaptersContainer);
if (chapterButton.classList.contains("ytp-chapter-container-disabled")) {