I'm developing an JavaScript app which needs to trigger mousemove
event, and I am using tampermonkey to "embed" it on websites to test if it works on them. On one website, the mousemove
event is simply blocked (I don't know why) and even console.log
within this event doesn't show. It seems like this event has never triggered (the website ignores).
Is it possible to "override" events and block them? If so, how can I override this action and enable my specific mousemove
event?
This script won't work:
document.addEventListener("mousemove", function(e) {
e = e || window.event;
e.stopPropagation();
console.log("[HELLO] Is it moving?!");
}, false);
(the result will be... nothing. this won't be logged)
Update They set window.onmousemove
as null
. Is there any way to revert this?