Hide custom chapter bar while generating

This commit is contained in:
Ajay 2022-09-05 00:03:57 -04:00
parent eaa119f152
commit 4c568212ac

View file

@ -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) {