mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Render preview bar behind scrubber
This commit is contained in:
parent
c7acb902a4
commit
b4a2f31520
3 changed files with 7 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
height: 100%;
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ function createPreviewBar(): void {
|
|||
// For mobile YouTube
|
||||
".progress-bar-background",
|
||||
// For YouTube
|
||||
".ytp-progress-bar-container",
|
||||
".ytp-progress-bar",
|
||||
".no-model.cue-range-markers",
|
||||
// For Invidious/VideoJS
|
||||
".vjs-progress-holder"
|
||||
|
|
|
@ -158,8 +158,6 @@ class PreviewBar {
|
|||
this.parent.addEventListener("mouseleave", () => this.container.classList.remove("hovered"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// On the seek bar
|
||||
this.parent.prepend(this.container);
|
||||
}
|
||||
|
@ -323,7 +321,11 @@ class PreviewBar {
|
|||
}
|
||||
|
||||
originalSectionClone.remove();
|
||||
progressBar.prepend(newChapterBar);
|
||||
if (this.container?.parentElement === progressBar) {
|
||||
progressBar.insertBefore(newChapterBar, this.container.nextSibling);
|
||||
} else {
|
||||
progressBar.prepend(newChapterBar);
|
||||
}
|
||||
|
||||
// Hide old bar
|
||||
chapterBar.style.display = "none";
|
||||
|
|
Loading…
Reference in a new issue