Make sure original chapter bar that is used is always the right one

This commit is contained in:
Ajay
2022-09-05 00:01:11 -04:00
parent e7deabe8d9
commit eaa119f152

View File

@@ -225,7 +225,7 @@ class PreviewBar {
const allProgressBars = document.querySelectorAll('.ytp-progress-bar') as NodeListOf<HTMLElement>;
this.progressBar = findValidElement(allProgressBars) ?? allProgressBars?.[0];
this.originalChapterBar = document.querySelector(".ytp-chapters-container:not(.sponsorBlockChapterBar)") as HTMLElement;
this.originalChapterBar = this.progressBar.querySelector(".ytp-chapters-container:not(.sponsorBlockChapterBar)") as HTMLElement;
}
private update(): void {