mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 21:17:20 +03:00
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user