From 4c568212ac84f1f0c4d0541243f80b48cdcf3a2c Mon Sep 17 00:00:00 2001 From: Ajay Date: Mon, 5 Sep 2022 00:03:57 -0400 Subject: [PATCH] Hide custom chapter bar while generating --- src/js-components/previewBar.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index b011b3dd..e0fa6464 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -318,7 +318,8 @@ class PreviewBar { this.customChaptersBar = this.originalChapterBar.cloneNode(true) as HTMLElement; this.customChaptersBar.classList.add("sponsorBlockChapterBar"); } - this.customChaptersBar.style.removeProperty("display"); + + this.customChaptersBar.style.display = "none"; const originalSections = this.customChaptersBar.querySelectorAll(".ytp-chapter-hover-container"); const originalSection = originalSections[0]; @@ -345,6 +346,7 @@ class PreviewBar { // Hide old bar this.originalChapterBar.style.display = "none"; + this.customChaptersBar.style.removeProperty("display"); if (createFromScratch) { if (this.container?.parentElement === this.progressBar) {