@iroomit/page-interaction-listener
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -1,1 +0,1 @@ | ||
"use strict";var a=a=>typeof a=='function',{isArray:b}=Array,{defineProperty:c}=Object,d=[],e=!1;c(exports,'__esModule',{value:!0});function f(A){if(e){console.warn('@iroomit/page-interaction-listener: Listener already triggered by interaction; adding a function now has no effect.');return}if(b(A))for(var i=0;i<A.length;i++)d.push(A[i]);else a(A)&&d.push(A)}function g(A){if(e){console.warn('@iroomit/page-interaction-listener: Listener already triggered by interaction; removing a function now has no effect.');return}if(b(A))for(var i=0;i<A.length;i++){let _=d.indexOf(A[i]);_>-1?d.splice(_,1):console.warn('@iroomit/page-interaction-listener: A listener that was never added was attempted to be removed and failed.')} else if(a(A)){let _=d.indexOf(A);_>-1?d.splice(_,1):console.warn('@iroomit/page-interaction-listener: A listener that was never added was attempted to be removed and failed.')}}function h(){if(e)return;e=!0;for(var A of d)A();document.removeEventListener('mousedown',h);document.removeEventListener('mousemove',h);document.removeEventListener('touchstart',h);document.removeEventListener('scroll',h);document.removeEventListener('keydown',h);while (d.length)d.pop()}typeof window!=='undefined'&&(document.addEventListener('mousedown',h),document.addEventListener('mousemove',h),document.addEventListener('touchstart',h),document.addEventListener('scroll',h),document.addEventListener('keydown',h));exports.default={addListener:f,removeListener:g}; | ||
"use strict";var A=a=>typeof a=='function',{isArray:b}=Array,{defineProperty:c}=Object,d=[],e=!1;c(exports,'__esModule',{value:!0});function f(_){if(e){console.warn('@iroomit/page-interaction-listener: Listener already triggered by interaction; adding a function now has no effect.');return}if(b(_))for(var i=0;i<_.length;i++)d.push(_[i]);else A(_)&&d.push(_)}function g(B){if(e){console.warn('@iroomit/page-interaction-listener: Listener already triggered by interaction; removing a function now has no effect.');return}if(b(B))for(var i=0;i<B.length;i++){let C=d.indexOf(B[i]);C>-1?d.splice(C,1):console.warn('@iroomit/page-interaction-listener: A listener that was never added was attempted to be removed and failed.')} else if(A(B)){let _a=d.indexOf(B);_a>-1?d.splice(_a,1):console.warn('@iroomit/page-interaction-listener: A listener that was never added was attempted to be removed and failed.')}}function h(){if(e)return;e=!0;for(var D of d)D();document.removeEventListener('mousedown',h);document.removeEventListener('mousemove',h);document.removeEventListener('touchstart',h);document.removeEventListener('scroll',h);document.removeEventListener('keydown',h);while (d.length)d.pop()}typeof window!=='undefined'&&(document.addEventListener('mousedown',h),document.addEventListener('mousemove',h),document.addEventListener('touchstart',h),document.addEventListener('scroll',h),document.addEventListener('keydown',h));exports.default={addListener:f,removeListener:g}; |
{ | ||
"name": "@iroomit/page-interaction-listener", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Takes a function (or several functions) as an argument and only executes them once the user has interacted with the page via mouse, keyboard or touch.", | ||
@@ -39,3 +39,3 @@ "main": "dist/index.min.js", | ||
"jest-environment-jsdom": "^29.5.0", | ||
"minify": "^10.2.0", | ||
"minify": "^11.0.1", | ||
"ts-jest": "^29.1.0", | ||
@@ -42,0 +42,0 @@ "ts-node": "^10.9.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47358