Merge pull request #1314 from mchangrh/mobileChapters

add selector for mobile YT chapters
This commit is contained in:
Ajay Ramachandran
2022-05-17 14:02:19 -04:00
committed by GitHub
3 changed files with 12 additions and 2 deletions

View File

@@ -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)
}
@@ -649,4 +653,6 @@ input::-webkit-inner-spin-button {
#sponsorBlockDurationAfterSkips.ytm-time-display {
padding-left: 4px;
margin: 0px;
color: #fff;
opacity: .7;
}

View File

@@ -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",

View File

@@ -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) {