Created
September 25, 2020 03:50
-
-
Save keithmccammon/c689dfdeddd221d7432d57deaebacc11 to your computer and use it in GitHub Desktop.
AutoScroll bookmarklet - from https://appdocumentary.com/2014/10/14/how-to-automatically-scroll-a-web-page-for-buttery-smooth-screen-captures/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(n,t)%7Bt%5B%27true%27%5D%3Dn%3Bvar i%3Dfunction(n,t,i)%7Bvar r%3Dn.style%3Br.webkitTransition%3Dr.transition%3Di%2B%27s%27%3Br.webkitTransitionTimingFunction%3Dr.TransitionTimingFunction%3D%27ease-in-out%27%3Br.webkitTransform%3Dr.Transform%3D%27translate3d(0, %27%2B-t%2B%27px, 0)%27%7D%3Bvar r%3Dfunction()%7Bvar n%3D%5B%5D.slice.call(arguments)%3Bvar t%3Dn.shift(),i%3Dn.shift(),r%3Dn%3BsetTimeout(function()%7Bi.apply(null,r)%7D,t*1e3)%7D%3Bvar e%3Dfunction(n,t,i,e)%7Br(t,o,i,e)%7D%3Bvar a%3Ddocument.getElementsByTagName(%27body%27)%5B0%5D%3Bvar o%3Di.bind(null,a)%3Bvar s%3De.bind(null,a)%3Bvar l%3Dfunction(n)%7Bvar t%3D%27Enter delay (in seconds), distance to scroll (in pixels) and the scroll duration (in seconds).%5Cn%5CnRun the script a second time with options 0 0 0 to reset the page.%5Cn%5CnExample:%5Cn%5Cn1 800 5%27%3Bif(n)%7Bt%3Dn%2B%27%5Cn%5Cn%27%2Bt%7Dvar i%3Dprompt(t)%3Bif(i%3D%3D%3Dnull)%7Breturn%7Dif(/%5Cd%7B1,%7D %5Cd%7B1,%7D %5Cd%7B1,%7D/.test(i))%7Breturn i.split(%27 %27)%7Dreturn l(%27Woops. Input invalid: %27%2Bi)%7D%3Bvar u%3Dfunction()%7Bvar n%3Dl()%3Bif(n)%7Bs.apply(null,n)%7D%7D%3Bu()%7D)(%7B%7D,function()%7Breturn this%7D())%3B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment