mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
reset custom chapters bar to null when deleting
This commit is contained in:
@@ -314,11 +314,11 @@ class PreviewBar {
|
||||
|
||||
createChaptersBar(segments: PreviewBarSegment[]): void {
|
||||
if (!this.progressBar || !this.originalChapterBar || this.originalChapterBar.childElementCount <= 0) {
|
||||
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
||||
if (this.originalChapterBar) this.originalChapterBar.style.removeProperty("display");
|
||||
|
||||
// Make sure other video types lose their chapter bar
|
||||
document.querySelectorAll(".sponsorBlockChapterBar").forEach((element) => element.remove());
|
||||
this.customChaptersBar = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user