Handle preview bar hover without js

This commit is contained in:
Ajay 2022-09-15 23:37:11 -04:00
parent 6381f36a90
commit b8d6d4a0b3
2 changed files with 2 additions and 5 deletions

View file

@ -34,7 +34,7 @@
height: 3px;
}
#previewbar.hovered {
div:hover > #previewbar.sbNotInvidious {
transform: scaleY(1)
}

View file

@ -196,10 +196,7 @@ class PreviewBar {
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"));
this.container.classList.add("sbNotInvidious");
}
// On the seek bar