mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 21:17:20 +03:00
Grow preview bar when the bar is hovered
Only for non chapter videos
This commit is contained in:
@@ -9,6 +9,12 @@
|
|||||||
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: 40;
|
||||||
|
|
||||||
|
transition: transform .1s cubic-bezier(0,0,0.2,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#previewbar.hovered {
|
||||||
|
transform: scaleY(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
.previewbar {
|
.previewbar {
|
||||||
|
|||||||
@@ -142,8 +142,15 @@ class PreviewBar {
|
|||||||
parent.style.opacity = "1";
|
parent.style.opacity = "1";
|
||||||
|
|
||||||
this.container.style.transform = "none";
|
this.container.style.transform = "none";
|
||||||
|
} else if (!this.onInvidious) {
|
||||||
|
// Hover listener
|
||||||
|
this.parent.addEventListener("mouseenter", () => this.container.classList.add("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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user