From 4d4689a19010a599868a86d21ec233bf669d1fb4 Mon Sep 17 00:00:00 2001 From: Michael C Date: Tue, 10 May 2022 20:51:32 -0400 Subject: [PATCH 1/3] add selector for mobile YT chapters #1287 --- src/content.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content.ts b/src/content.ts index 7b0b1a82..10c44d47 100644 --- a/src/content.ts +++ b/src/content.ts @@ -394,6 +394,8 @@ function createPreviewBar(): void { const progressElementSelectors = [ // For mobile YouTube ".progress-bar-background", + // for new mobile YouTube (#1287) + ".ytm-progress-bar", // For YouTube ".ytp-progress-bar-container", ".no-model.cue-range-markers", From bf3dcd97b88fd153324c968d0d92d901dd6e3882 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 17 May 2022 13:50:30 -0400 Subject: [PATCH 2/3] Fix time without skips --- public/content.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/content.css b/public/content.css index c3c0d65b..027608bb 100644 --- a/public/content.css +++ b/public/content.css @@ -649,4 +649,6 @@ input::-webkit-inner-spin-button { #sponsorBlockDurationAfterSkips.ytm-time-display { padding-left: 4px; margin: 0px; + color: #fff; + opacity: .7; } From 773da185ee76a267bd7755005e54f0d88224573b Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 17 May 2022 13:55:39 -0400 Subject: [PATCH 3/3] Fix visual issues on mobile preview bar --- public/content.css | 4 ++++ src/js-components/previewBar.ts | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/content.css b/public/content.css index 027608bb..6a2c1a04 100644 --- a/public/content.css +++ b/public/content.css @@ -17,6 +17,10 @@ transition: transform .1s cubic-bezier(0,0,0.2,1); } +.ytm-progress-bar > #previewbar { + height: 3px; +} + #previewbar.hovered { transform: scaleY(1) } diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index d4d041a9..16098b7d 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -144,8 +144,10 @@ class PreviewBar { this.parent = parent; if (this.onMobileYouTube) { - parent.style.backgroundColor = "rgba(255, 255, 255, 0.3)"; - parent.style.opacity = "1"; + if (parent.classList.contains("progress-bar-background")) { + parent.style.backgroundColor = "rgba(255, 255, 255, 0.3)"; + parent.style.opacity = "1"; + } this.container.style.transform = "none"; } else if (!this.onInvidious) {