diff options
author | Ajay <[email protected]> | 2022-10-07 11:59:56 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-10-07 11:59:56 -0400 |
commit | 08181c1d5feda9df1aaeb95b7e4d4419819c2ab6 (patch) | |
tree | 3056913a091ded2df4469c147e123b01379de893 /src | |
parent | 03cd1b535b570ea7e4db374b38ba0cc891a4a55d (diff) | |
download | SponsorBlock-08181c1d5feda9df1aaeb95b7e4d4419819c2ab6.tar.gz SponsorBlock-08181c1d5feda9df1aaeb95b7e4d4419819c2ab6.zip |
Clear bote buttons when clearing preview bar
Diffstat (limited to 'src')
-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) { |