From dbd0d157a8ded8573e13535be7651fb7839ff0ed Mon Sep 17 00:00:00 2001 From: Ajay Date: Mon, 23 Sep 2024 01:37:11 -0400 Subject: [PATCH] Fix preview bar not appearing on mobile due to new layout Fixes #2109 --- src/content.ts | 8 ++------ src/js-components/previewBar.ts | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/content.ts b/src/content.ts index c9e72dcd..74d9c80c 100644 --- a/src/content.ts +++ b/src/content.ts @@ -512,12 +512,8 @@ function handleMobileControlsMutations(): void { function getPreviewBarAttachElement(): HTMLElement | null { const progressElementOptions = [{ - // For new mobile YouTube (#1287) - selector: ".progress-bar-line", - isVisibleCheck: true - }, { - // For newer mobile YouTube (Jan 2024) - selector: ".YtProgressBarProgressBarLine", + // For newer mobile YouTube (Sept 2024) + selector: ".YtChapteredProgressBarHost", isVisibleCheck: true }, { // For newer mobile YouTube (May 2024) diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index a014d606..004d4677 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -197,7 +197,6 @@ class PreviewBar { if (this.onMobileYouTube) { this.container.style.transform = "none"; - this.container.style.height = "var(--yt-progress-bar-height)"; } else if (!this.onInvidious) { this.container.classList.add("sbNotInvidious"); }