Fix custom chapter bar sometimes sticking around

This commit is contained in:
Ajay
2022-09-23 11:01:01 -04:00
parent 4c903456ff
commit 0d6a40b9fc

View File

@@ -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;
}