mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
Render preview bar behind scrubber
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
transform: scaleY(0.6) translateY(-30%) translateY(1.5px);
|
transform: scaleY(0.6) translateY(-30%) translateY(1.5px);
|
||||||
z-index: 40;
|
z-index: 42;
|
||||||
|
|
||||||
transition: transform .1s cubic-bezier(0,0,0.2,1);
|
transition: transform .1s cubic-bezier(0,0,0.2,1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ function createPreviewBar(): void {
|
|||||||
// For mobile YouTube
|
// For mobile YouTube
|
||||||
".progress-bar-background",
|
".progress-bar-background",
|
||||||
// For YouTube
|
// For YouTube
|
||||||
".ytp-progress-bar-container",
|
".ytp-progress-bar",
|
||||||
".no-model.cue-range-markers",
|
".no-model.cue-range-markers",
|
||||||
// For Invidious/VideoJS
|
// For Invidious/VideoJS
|
||||||
".vjs-progress-holder"
|
".vjs-progress-holder"
|
||||||
|
|||||||
@@ -158,8 +158,6 @@ class PreviewBar {
|
|||||||
this.parent.addEventListener("mouseleave", () => this.container.classList.remove("hovered"));
|
this.parent.addEventListener("mouseleave", () => this.container.classList.remove("hovered"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// On the seek bar
|
// On the seek bar
|
||||||
this.parent.prepend(this.container);
|
this.parent.prepend(this.container);
|
||||||
}
|
}
|
||||||
@@ -323,7 +321,11 @@ class PreviewBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
originalSectionClone.remove();
|
originalSectionClone.remove();
|
||||||
progressBar.prepend(newChapterBar);
|
if (this.container?.parentElement === progressBar) {
|
||||||
|
progressBar.insertBefore(newChapterBar, this.container.nextSibling);
|
||||||
|
} else {
|
||||||
|
progressBar.prepend(newChapterBar);
|
||||||
|
}
|
||||||
|
|
||||||
// Hide old bar
|
// Hide old bar
|
||||||
chapterBar.style.display = "none";
|
chapterBar.style.display = "none";
|
||||||
|
|||||||
Reference in New Issue
Block a user