Fix preview bar on mobile

This commit is contained in:
Ajay
2022-09-22 16:34:17 -04:00
parent b96cdbe40a
commit c17cf74389

View File

@@ -234,6 +234,7 @@ class PreviewBar {
const allProgressBars = document.querySelectorAll('.ytp-progress-bar') as NodeListOf<HTMLElement>;
this.progressBar = findValidElement(allProgressBars) ?? allProgressBars?.[0];
if (this.progressBar) {
const newChapterBar = this.progressBar.querySelector(".ytp-chapters-container:not(.sponsorBlockChapterBar)") as HTMLElement;
if (this.originalChapterBar !== newChapterBar) {
// Make sure changes are undone on old bar
@@ -241,7 +242,7 @@ class PreviewBar {
this.originalChapterBar = newChapterBar;
}
}
}
private update(): void {