MCPcopy Index your code
hub / github.com/hoothin/UserScripts / mouseDownHandler

Method mouseDownHandler

Pagetual/pagetual.user.js:8302–8318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8300 }
8301 };
8302 let mouseDownHandler = e => {
8303 initX = clientX(e);
8304 initY = clientY(e);
8305 moving = false;
8306 clearTimeout(removeTimer);
8307 removeTimer = setTimeout(() => {
8308 if (e.type === "touchstart") {
8309 picker.start();
8310 } else {
8311 self.remove();
8312 }
8313 }, 1500);
8314 document.addEventListener("mousemove", mouseMoveHandler, true);
8315 document.addEventListener("mouseup", mouseUpHandler, true);
8316 document.addEventListener("touchmove", mouseMoveHandler, true);
8317 document.addEventListener("touchend", mouseUpHandler, true);
8318 };
8319
8320 move.addEventListener("mousedown", mouseDownHandler, true);
8321 move.addEventListener("touchstart", mouseDownHandler, { passive: false, capture: true });

Callers

nothing calls this directly

Calls 4

clientXFunction · 0.85
clientYFunction · 0.85
removeMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected