 <p>Take a look on that script: <a href="https://github.com/CardinalPath/gas/blob/master/src/plugins/max_scroll.js" rel="nofollow">https://github.com/CardinalPath/gas/blob/master/src/plugins/max_scroll.js</a> Regards</p>