From 4a532e751cc324227cdb6865a2247bc5556f0238 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sun, 9 Oct 2022 16:44:53 -0400 Subject: [PATCH] Add class for other extensions when displaying non chapter title --- src/js-components/previewBar.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 24251c09..8a9834c1 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -776,6 +776,11 @@ class PreviewBar { const chapterTitle = chaptersContainer.querySelector(".ytp-chapter-title-content") as HTMLDivElement; chapterTitle.innerText = chosenSegment.description || shortCategoryName(chosenSegment.category); + if (chosenSegment.actionType !== ActionType.Chapter) { + chapterTitle.classList.add("sponsorBlock-segment-title"); + } else { + chapterTitle.classList.remove("sponsorBlock-segment-title"); + } if (chosenSegment.source === SponsorSourceType.Server) { const chapterVoteContainer = this.chapterVote.getContainer();