From 0d6a40b9fce79bba5d6ce7e23a1524f1e23f9642 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 23 Sep 2022 11:01:01 -0400 Subject: [PATCH] Fix custom chapter bar sometimes sticking around --- src/js-components/previewBar.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 1e45a2a7..959864c8 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -316,6 +316,9 @@ class PreviewBar { 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()); return; }