mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Deletew all custom chapter bars we don't know about when clearing preview bar
This commit is contained in:
@@ -218,6 +218,12 @@ class PreviewBar {
|
|||||||
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
||||||
this.originalChapterBar?.style?.removeProperty("display");
|
this.originalChapterBar?.style?.removeProperty("display");
|
||||||
this.chapterVote?.setVisibility(false);
|
this.chapterVote?.setVisibility(false);
|
||||||
|
|
||||||
|
document.querySelectorAll(`.sponsorBlockChapterBar`).forEach((e) => {
|
||||||
|
if (e !== this.customChaptersBar) {
|
||||||
|
e.remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
set(segments: PreviewBarSegment[], videoDuration: number): void {
|
set(segments: PreviewBarSegment[], videoDuration: number): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user