mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 06:27:14 +03:00
Don't trigger hover autoplay from hovering over thumbnail label
This commit is contained in:
@@ -60,6 +60,15 @@ function createOrGetThumbnail(thumbnail: HTMLImageElement): { overlay: HTMLEleme
|
|||||||
|
|
||||||
const overlay = document.createElement("div") as HTMLElement;
|
const overlay = document.createElement("div") as HTMLElement;
|
||||||
overlay.classList.add("sponsorThumbnailLabel");
|
overlay.classList.add("sponsorThumbnailLabel");
|
||||||
|
// Disable hover autoplay
|
||||||
|
overlay.addEventListener("pointerenter", (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
thumbnail.dispatchEvent(new PointerEvent("pointerleave", { bubbles: true }));
|
||||||
|
});
|
||||||
|
overlay.addEventListener("pointerleave", (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
thumbnail.dispatchEvent(new PointerEvent("pointerenter", { bubbles: true }));
|
||||||
|
});
|
||||||
|
|
||||||
const icon = createSBIconElement();
|
const icon = createSBIconElement();
|
||||||
const text = document.createElement("span");
|
const text = document.createElement("span");
|
||||||
|
|||||||
Reference in New Issue
Block a user