Add class for other extensions when displaying non chapter title

This commit is contained in:
Ajay
2022-10-09 16:44:53 -04:00
parent 5c9e06468e
commit 4a532e751c

View File

@@ -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();