mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
441 B
JavaScript
1 line
441 B
JavaScript
(()=>(e,t)=>{(async()=>{const e=await SpinQuery.select((()=>document.querySelector(".ops span.like")));if(!e){return}e.style.userSelect="none";function t(t,n){const s=new CustomEvent(t,n);e.dispatchEvent(s)}const n=200;let s=true;e.addEventListener("touchstart",(e=>{e.preventDefault();s=true;setTimeout((()=>s=false),n);t("mousedown",e)}));e.addEventListener("touchend",(e=>{e.preventDefault();t("mouseup",e);if(s){t("click",e)}}))})()})(); |