mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Fix custom chapter bar sometimes sticking around
This commit is contained in:
@@ -316,6 +316,9 @@ class PreviewBar {
|
|||||||
if (!this.progressBar || !this.originalChapterBar || this.originalChapterBar.childElementCount <= 0) {
|
if (!this.progressBar || !this.originalChapterBar || this.originalChapterBar.childElementCount <= 0) {
|
||||||
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
||||||
if (this.originalChapterBar) this.originalChapterBar.style.removeProperty("display");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user