Skip to content

Commit dabc63a

Browse files
committed
Deletew all custom chapter bars we don't know about when clearing preview bar
1 parent 08181c1 commit dabc63a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/js-components/previewBar.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ class PreviewBar {
218218
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
219219
this.originalChapterBar?.style?.removeProperty("display");
220220
this.chapterVote?.setVisibility(false);
221+
222+
document.querySelectorAll(`.sponsorBlockChapterBar`).forEach((e) => {
223+
if (e !== this.customChaptersBar) {
224+
e.remove();
225+
}
226+
});
221227
}
222228

223229
set(segments: PreviewBarSegment[], videoDuration: number): void {

0 commit comments

Comments
 (0)