Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scrolldir

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrolldir - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

.eslintrc

4

dist/scrolldir.auto.js
/**
scrolldir - Vertical scroll direction in CSS
@version v1.5.1
@version v1.5.2
@link https://github.com/yowainwright/scrolldir.git
@author Patrick Fisher <patrick@pwfisher.com>
@author Patrick Fisher <patrick@pwfisher.com>, Jeffry Wainwright <yowainwright@gmail.com>
@license MIT

@@ -7,0 +7,0 @@ **/

/**
scrolldir - Vertical scroll direction in CSS
@version v1.5.1
@version v1.5.2
@link https://github.com/yowainwright/scrolldir.git
@author Patrick Fisher <patrick@pwfisher.com>
@author Patrick Fisher <patrick@pwfisher.com>, Jeffry Wainwright <yowainwright@gmail.com>
@license MIT
**/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var a,d,t,s="data-scrolldir",f="down",l=64,u=document.documentElement,c=window,m=document.body,h=32,v=512,w=Array(h),b=0;function e(){var t=c.scrollY||c.pageYOffset,e=a.timeStamp,n="down"===f?Math.max:Math.min,i=m.scrollHeight-c.innerHeight;if(t=Math.max(0,t),t=Math.min(i,t),w.unshift({y:t,t:e}),w.pop(),t===n(d,t))return b=e,void(d=t);var r=e-v;if(b<r){d=t;for(var o=0;o<h&&(w[o]&&!(w[o].t<r));o+=1)d=n(d,w[o].y)}Math.abs(t-d)>l&&(d=t,b=e,f="down"===f?"up":"down",u.setAttribute(s,f))}function n(t){return a=t,c.requestAnimationFrame(e)}t&&(t.attribute&&(s=t.attribute),t.el&&(u=t.el),t.win&&(c=t.win),t.dir&&(f=t.dir),t.thresholdPixels&&(l=t.thresholdPixels),!0===t.off)?(u.setAttribute(s,"off"),c.removeEventListener("scroll",n)):(d=c.scrollY||c.pageYOffset,u.setAttribute(s,f),c.addEventListener("scroll",n))});
/**
scrolldir - Vertical scroll direction in CSS
@version v1.5.1
@version v1.5.2
@link https://github.com/yowainwright/scrolldir.git
@author Patrick Fisher <patrick@pwfisher.com>
@author Patrick Fisher <patrick@pwfisher.com>, Jeffry Wainwright <yowainwright@gmail.com>
@license MIT

@@ -7,0 +7,0 @@ **/

/**
scrolldir - Vertical scroll direction in CSS
@version v1.5.1
@version v1.5.2
@link https://github.com/yowainwright/scrolldir.git
@author Patrick Fisher <patrick@pwfisher.com>
@author Patrick Fisher <patrick@pwfisher.com>, Jeffry Wainwright <yowainwright@gmail.com>
@license MIT

@@ -7,0 +7,0 @@ **/

/**
scrolldir - Vertical scroll direction in CSS
@version v1.5.1
@version v1.5.2
@link https://github.com/yowainwright/scrolldir.git
@author Patrick Fisher <patrick@pwfisher.com>
@author Patrick Fisher <patrick@pwfisher.com>, Jeffry Wainwright <yowainwright@gmail.com>
@license MIT
**/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).scrollDir=e()}(this,function(){"use strict";var s,d,f="data-scrolldir",u="down",a=64,l=document.documentElement,c=window,m=document.body,h=32,p=512,b=Array(h),v=0;function e(){var t=c.scrollY||c.pageYOffset,e=s.timeStamp,n="down"===u?Math.max:Math.min,r=m.scrollHeight-c.innerHeight;if(t=Math.max(0,t),t=Math.min(r,t),b.unshift({y:t,t:e}),b.pop(),t===n(d,t))return v=e,void(d=t);var i=e-p;if(v<i){d=t;for(var o=0;o<h&&(b[o]&&!(b[o].t<i));o+=1)d=n(d,b[o].y)}Math.abs(t-d)>a&&(d=t,v=e,u="down"===u?"up":"down",l.setAttribute(f,u))}function n(t){return s=t,c.requestAnimationFrame(e)}return function(t){return t&&(t.attribute&&(f=t.attribute),t.el&&(l=t.el),t.win&&(c=t.win),t.dir&&(u=t.dir),t.thresholdPixels&&(a=t.thresholdPixels),!0===t.off)?(l.setAttribute(f,"off"),c.removeEventListener("scroll",n)):(d=c.scrollY||c.pageYOffset,l.setAttribute(f,u),c.addEventListener("scroll",n))}});
{
"name": "scrolldir",
"version": "1.5.1",
"version": "1.5.2",
"description": "Vertical scroll direction in CSS",

@@ -29,3 +29,3 @@ "main": "dist/scrolldir.js",

],
"author": "Patrick Fisher <patrick@pwfisher.com>",
"author": "Patrick Fisher <patrick@pwfisher.com>, Jeffry Wainwright <yowainwright@gmail.com>",
"license": "MIT",

@@ -39,3 +39,3 @@ "bugs": {

"@babel/preset-env": "^7.0.0-beta.46",
"bower": "^1.7.9",
"@heartly/eslint-config": "^0.0.2",
"es-check": "^5.0.0",

@@ -49,3 +49,4 @@ "eslint": "^6.0.0",

"rollup-plugin-uglify": "^6.0.0"
}
},
"prettier": "@heartly/eslint-config/dist/prettier"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc