Deletew all custom chapter bars we don't know about when clearing preview bar

This commit is contained in:
Ajay 2022-10-07 12:02:14 -04:00
parent 08181c1d5f
commit dabc63af73

View file

@ -218,6 +218,12 @@ class PreviewBar {
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
this.originalChapterBar?.style?.removeProperty("display");
this.chapterVote?.setVisibility(false);
document.querySelectorAll(`.sponsorBlockChapterBar`).forEach((e) => {
if (e !== this.customChaptersBar) {
e.remove();
}
});
}
set(segments: PreviewBarSegment[], videoDuration: number): void {