MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / directionCheck

Function directionCheck

scripts/smoothScroll.js:711–722  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

709 return el && (el.nodeName || "").toLowerCase() === tag.toLowerCase();
710 }
711 function directionCheck(x, y) {
712 x = x > 0 ? 1 : -1;
713 y = y > 0 ? 1 : -1;
714 if (direction.x !== x || direction.y !== y) {
715 direction.x = x;
716 direction.y = y;
717 que = [];
718 lastScroll = 0;
719 window.cancelAnimationFrame(pending);
720 pending = null;
721 }
722 }
723 function isTouchpad(deltaY) {
724 if (!deltaY) return;
725 if (!deltaBuffer.length) {

Callers 1

scrollArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected