mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-09-20 04:53:43 +02:00
reset custom chapters bar to null when deleting
This commit is contained in:
parent
e11a320c3f
commit
e1688c3f58
1 changed files with 1 additions and 1 deletions
|
@ -314,11 +314,11 @@ class PreviewBar {
|
|||
|
||||
createChaptersBar(segments: PreviewBarSegment[]): void {
|
||||
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());
|
||||
this.customChaptersBar = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue