mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 06:27:14 +03:00
Fix preview bar on mobile
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user