Add alt text to skip to highlight

This commit is contained in:
Ajay Ramachandran 2021-09-30 18:20:58 -04:00
parent 2064afb235
commit 59f8f82655

View file

@ -77,7 +77,8 @@ export class SkipButtonControlBar {
this.chapterText?.classList?.add("hidden");
this.container.classList.remove("hidden");
this.textContainer?.classList?.remove("hidden");
this.textContainer.innerText = getSkippingText([this.segment], false) + (this.showKeybindHint ? " (" + Config.config.skipKeybind + ")" : "");
this.textContainer.innerText = this.getTitle();
this.skipIcon.setAttribute("title", this.getTitle());
}
}
@ -123,6 +124,10 @@ export class SkipButtonControlBar {
utils.enableAutoHideAnimation(this.skipIcon);
}
private getTitle(): string {
return getSkippingText([this.segment], false) + (this.showKeybindHint ? " (" + Config.config.skipKeybind + ")" : "");
}
private getChapterPrefix(): HTMLElement {
return document.querySelector(".ytp-chapter-title-prefix");
}