22 comments

[ 5.7 ms ] story [ 52.3 ms ] thread
I think I'm already having heart palpitations.
This reminds me of the "smooth scroll" scripts that muck up so many websites ... it made me laugh out loud!
blame apple then

and cry out loud as well

blame "designers" who wanted to emulate this behaviour
That's actually a nice library, that could be use for april fools or something.
I think this warrants a comment with a simple "LOL"
Oh, it's like my iPad when scrolling through PDFs.
Free Obfuscated Source Satire (FOSS)

The JS from https://github.com/benzweig/jankyscroll:

<script>var jankyscroll=function(){"use strict";function n(){var n=Math.round(Math.random());return 1==n?-1:1}function o(){return(5Math.random()+8)/10}return function(r,t){function i(){a&&clearTimeout(a),a=setTimeout(function(){window.scrollBy(0,to()n())},400)}r=r||400,t=t||20;var e,a,c=function(){var i=Math.floor(window.scrollY/r);e!==i&&(window.scrollBy(0,to()*n()),e=i)};window.addEventListener("scroll",c,!1),window.addEventListener("resize",i,!1)}}();jankyscroll(170,100);</script>

Switch to the master branch. :) it confused me too.
Congratulations on the amazing adoption rate! I've seen this live on hundreds on sites the last few years.
I just don't understand who the fuck thinks it's a good idea to mess with scroll?

Can you imagine? Someone sits down and decides it's a good idea and then puts in, god only knows, how much person-power to get it included. Christ.

Amusingly, my usage of PgUp/PgDown was unaffected.

I will live to scroll another day!

def file an issue, that's an unacceptable lack of jank
You can also defeat it by clicking and dragging the scroll bar. It will still jank, but since it can't move your mouse, the mouse will instantly drag the scroll bar right back to where it was before the jank triggered.
Ah, that's what the guardian has started using!
I am installing this by default in all my client projects from now on to give them something amorphous to complain about but easy to fix.
(comment deleted)
It's sad that this is actually more functional than the broken scrolling on many popular websites.
I can see Jankyscroll is programmed in VanillaJS, which is another framework I highly recommend: http://vanilla-js.com
(comment deleted)