mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
@@ -740,7 +740,7 @@ class PreviewBar {
|
|||||||
|| ((!segments || segments.length <= 0) && submittingSegments?.length <= 0)) {
|
|| ((!segments || segments.length <= 0) && submittingSegments?.length <= 0)) {
|
||||||
const chaptersContainer = this.getChaptersContainer();
|
const chaptersContainer = this.getChaptersContainer();
|
||||||
const chapterButton = this.getChapterButton(chaptersContainer);
|
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";
|
chaptersContainer.style.display = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -820,7 +820,7 @@ class PreviewBar {
|
|||||||
|
|
||||||
private getChapterButton(chaptersContainer: HTMLElement): HTMLButtonElement {
|
private getChapterButton(chaptersContainer: HTMLElement): HTMLButtonElement {
|
||||||
return (chaptersContainer ?? this.getChaptersContainer())
|
return (chaptersContainer ?? this.getChaptersContainer())
|
||||||
.querySelector("button.ytp-chapter-title") as HTMLButtonElement;
|
?.querySelector("button.ytp-chapter-title") as HTMLButtonElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
remove(): void {
|
remove(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user