// ==UserScript==
// @name 长按触发鼠标悬停
// @namespace https://viayoo.com/
// @version 1.5
// @homepageURL https://app.viayoo.com/addons/39
// @author Sky
// @run-at document-start
// @match *
// @grant none
// ==/UserScript==
(function(){
const key = encodeURIComponent('长按触发鼠标悬停:执行判断'),
flag = navigator.userAgent.indexOf('Android') < 0 && navigator.userAgent.indexOf('iPhone') < 0;
if(!flag || window[key]){return;}
try {
window[key] = true;
const evt = new Event('mouseover', {'bubbles':true, 'cancelable':true});
document.addEventListener('touchstart', function(e){
e.target.dispatchEvent(evt);
}, {'passive':true, 'capture':true});
} catch(err){console.log('长按触发鼠标悬停:', err);}
})();
Back to home |
File page
Subscribe |
Register |
Login
| N