mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01: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 {
|
createChaptersBar(segments: PreviewBarSegment[]): void {
|
||||||
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.originalChapterBar) this.originalChapterBar.style.removeProperty("display");
|
if (this.originalChapterBar) this.originalChapterBar.style.removeProperty("display");
|
||||||
|
|
||||||
// Make sure other video types lose their chapter bar
|
// Make sure other video types lose their chapter bar
|
||||||
document.querySelectorAll(".sponsorBlockChapterBar").forEach((element) => element.remove());
|
document.querySelectorAll(".sponsorBlockChapterBar").forEach((element) => element.remove());
|
||||||
|
this.customChaptersBar = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue