mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
parent
4b4743f1f7
commit
2c5db670a4
1 changed files with 2 additions and 2 deletions
|
@ -740,7 +740,7 @@ class PreviewBar {
|
|||
|| ((!segments || segments.length <= 0) && submittingSegments?.length <= 0)) {
|
||||
const chaptersContainer = this.getChaptersContainer();
|
||||
const chapterButton = this.getChapterButton(chaptersContainer);
|
||||
if (chapterButton.classList.contains("ytp-chapter-container-disabled")) {
|
||||
if (chapterButton && chapterButton.classList.contains("ytp-chapter-container-disabled")) {
|
||||
chaptersContainer.style.display = "none";
|
||||
}
|
||||
|
||||
|
@ -820,7 +820,7 @@ class PreviewBar {
|
|||
|
||||
private getChapterButton(chaptersContainer: HTMLElement): HTMLButtonElement {
|
||||
return (chaptersContainer ?? this.getChaptersContainer())
|
||||
.querySelector("button.ytp-chapter-title") as HTMLButtonElement;
|
||||
?.querySelector("button.ytp-chapter-title") as HTMLButtonElement;
|
||||
}
|
||||
|
||||
remove(): void {
|
||||
|
|
Loading…
Reference in a new issue