

Auto Scroll HN Comments (or any site) like an Autocue - keyboardP

I avoided using "Show HN" as it implies something a bit more substantial, but I figured I'd share a small piece of Javascript to scroll the webpage so that you can sit back and read comments without scrolling manually.<p>Highlight and drag the code below to your bookmarks bar (or create a new bookmark and set the code below as the address, but be sure to include the 'javascript:' part).<p>javascript:var isScrolling; var scrolldelay; function pageScroll() { window.scrollBy(0,1); scrolldelay = setTimeout('pageScroll()',25); isScrolling = true; } if(!isScrolling) { pageScroll(); } else { isScrolling = false; clearTimeout(scrolldelay); }<p>To increase or decrease the speed, you can change the 25 in setTimeout(‘pageScroll()’,25) to however many milliseconds you want to pass before updating the page. The higher the number, the slower it will scroll.<p>Click on the bookmarklet to start and stop scrolling.<p>Enjoy :)
======
rdwallis
Cool stuff.

You should adapt the scrolling speed to the number of characters in each
comment if you're able. It's hard to do but it'll improve things tremendously.

Full disclosure, I'm waging a war against your bookmarklet's scrolling effect.
See: <http://www.magicscroll.net/ScrollTheWeb.html>

You can try the autoscroll feature at the bottom right on that page to see how
much of difference matching the scroll speed to character count makes.

My solution doesn't work well with tree structured documents like comment
threads though. Perhaps I need to adapt it.

~~~
keyboardP
Thanks! This was just a 5 minute hack but I really like the suggestion of
variable speed based on the current text length. I tried your autoscroll
method and the changing scroll speed works well.

