diff options
author | Ajay <[email protected]> | 2022-10-09 16:44:53 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-10-09 16:44:53 -0400 |
commit | 4a532e751cc324227cdb6865a2247bc5556f0238 (patch) | |
tree | 104080d83afe30269a1cebd8d80a066b69b56abc /src/js-components/previewBar.ts | |
parent | 5c9e06468e5c415ab6dbe3464a0bb735b3d71db3 (diff) | |
download | SponsorBlock-4a532e751cc324227cdb6865a2247bc5556f0238.tar.gz SponsorBlock-4a532e751cc324227cdb6865a2247bc5556f0238.zip |
Add class for other extensions when displaying non chapter title
Diffstat (limited to 'src/js-components/previewBar.ts')
-rw-r--r-- | src/js-components/previewBar.ts | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |