diff options
Diffstat (limited to 'src/js-components/previewBar.ts')
-rw-r--r-- | src/js-components/previewBar.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 49b3676d..1de04412 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -217,6 +217,7 @@ class PreviewBar { if (this.customChaptersBar) this.customChaptersBar.style.display = "none"; this.originalChapterBar?.style?.removeProperty("display"); + this.chapterVote?.setVisibility(false); } set(segments: PreviewBarSegment[], videoDuration: number): void { @@ -770,8 +771,8 @@ class PreviewBar { const chapterTitle = chaptersContainer.querySelector(".ytp-chapter-title-content") as HTMLDivElement; chapterTitle.innerText = chosenSegment.description || shortCategoryName(chosenSegment.category); - const chapterVoteContainer = this.chapterVote.getContainer(); if (chosenSegment.source === SponsorSourceType.Server) { + const chapterVoteContainer = this.chapterVote.getContainer(); if (!chapterButton.contains(chapterVoteContainer)) { const oldVoteContainers = document.querySelectorAll("#chapterVote"); if (oldVoteContainers.length > 0) { |