Saturday, August 23, 2008

Autoscroll in Safari, Firefox

The Autoscroll Bookmarklet

Bookmarklets are actually a cool little concept – make a link that runs a JavaScript command and inject code into any web-page. Brilliant! Combine this with an obsessive computer nerd with some free time on a Saturday evening (for example, me), and you get following:

AutoscrollThe Bookmarklet

Works in Safari and Firefox. If you’re lucky it might work in Opera, Camino, and Konqueror. If you’re at least as lucky as this guy, it might work in IE.

Usage

Click the really big link above to activate auto-scroll (you may want to make your window small enough to have significant scroll space

Here’s the buttons to push:

0-9 : Set scroll speed, 0 being stand-still and 9 being skim-speed
: Decrease speed
= : Increase speed
shift + – : Decrease speed quickly
shift + = : Increase speed quickly
q : Quit

Installation:

If you’d like to pack this sweet action with you, drag the “Autoscroll” link to your bookmarks tool bar.

33 comments:

TheStandUpPhysicist said...

Nice. I wasted a few hours trying to get firefox or opera to scroll for a telepromter. Now I can click and go, while adjusting on the fly using a keyboard.

hand2mouth said...

Thank you! Since I can't use a mouse, Firefox's native autoscroll function is inaccessible to me. But now I can click the link with Mouseless Browsing, and there it goes. Beats losing a keyboard key to an AutoHotKey script.

Tim Harper said...

Hey, I'm certainly glad you found it useful! Thanks for stopping by :)

I saw your post about Dragon's inability to middle click... bummer. I'm a big fan of DNS myself, and am considering either buying MacSpeech, or upgrading to 10 and staying with Parallels. How do you like DNS 10?

pope52 said...

FYI, this script has saved me from tendonitis. I use it daily. Thank you.

goborobo said...

Thanks. Really useful.

jonathan said...

Gracias Awesome setup/play...

-jmnoq

Angela said...

This is great. Thanks so much!

yamamoto said...

What a good bookmarklet it is! But it doesn't work in iPhone safari. Prease make it for iPhone!!!

David said...

I was looking for a way to slow down auto scrolling using a mouse and found this site. This is exactly what I wanted but using the keyboard. I see lots of queries regarding this but no similar answers for mouse control. Thanks for your efforts. There is obviously a need for this to read on line.
Dave

Tom said...

Tim,

I use your this bookmarklet daily and was curious how to modify the code such as to set a new default scroll speed.

Thanks for making this available.

Best,
Tom

Tim Harper said...

Hey Tom,

The source code is in there. It's a bit encoded, but with a little bit of effort you could decode it easily. Then search for a bookmarklet encoder to encode it back up again.

The speeds are there at the top. It's an array of [pixels to move, delay between movements]. It's using a logarithmic scale, doubling the amount of pixels and the delay every time the delay goes below 25 (browsers tank at that threshold).

Tom said...

Found it. Somehow I'd missed ss_speed variable in the URL encoding, so I wasn't understanding how you set the default scroll value.

To those who want to do likewise, just change "ss_speed=1" to whatever predefined speed you want. The number corresponds to the scroll speed key you'd press on your keyboard.

Best,
Tom

Weeb said...

Esc does not seem to work. 0 stops scrolling. Esc does nothing. Not sure what it's supposed to do. Running Snow Leopard, Safari, on a Mac Pro.

Tim Harper said...

hmm... it used to :S Maybe Safari changed the keycode sent by escape.

At any rate, been thinking about mapping it to Q as well.

decaturcomp said...

Nicely done. Tweeted and FBed.

Doc said...

Brilliant! What an incredible time saver. Used in conjunction with Readability (both recommended by ScreenCastsOnline's Don McAllister) your service is truly enchanting.

EverEvolving said...

Please help me out.I've been enjoying using this bookmarklet! My question is, how do I start scrolling without using the mouse? I was searching for the answer to that, to no avail...Mouseless Browsing does not help with a bookmark...or, at least I could not find how to do that... Anyone, help me start scrolling with keyboard?

Tim Harper said...

@everevolving:

You could just assign a keyword to it: just open the bookmarks manager, select your bookmark in the bookmark toolbar folder, expand the little arrow to get more options, and type "as" under "keyword".

With this setting, whenever you type in "as" in the address bar, auto scroll will get invoked.

There may be a better solution, like some Firefox plug-in that enables you to set hotkeys to bookmarks, but without any additional extensions, this should do the job and allow you to activate it without having to use the mouse.

cotcaro said...

Hello Tim,

Can I use this script in a Firefox Add-on? Also could you contant me via cotcaro (at) gmail . com

Elke said...

I love this. Thanks to 30DCplus for this great tip

Chad said...

Thanks! this will be great for reading drum tabs while playing.. heck any tabs at all

Dallin said...

IS there a way where once it gets the the bottom if a webpage to automatically return to the top and scroll down again? Like a looping scroll?

Tim Harper said...

not without modifying the source code, no. However, with modifying the source code, the sky is practically the limit.

Richard said...

Can it work on an iPad?
Richard

Tim Harper said...

@Richard - you'd probably need to modify it to work on an iPad. I mean, it might work as is if you hooked up a bluetooth keyboard. It's the lack of a keyboard that might be a problem.

Unknown said...

Very useful, can this code run on an onclick event of a button in a web page; example;

[script]
function autoscroll()
{
your code here
}
[/script]

[body]
[input type=button onclick='autoscroll()' value='scroll this page now']
my page
[/body]

I tried copy/paste of your code but no luck.

Tim Harper said...

@Unknown - the code is encoded for a link, so it won't work verbatim. If you de-url-encode and remove the hyperlink ceremony it it should work.

Also you could paste it verbatim in a link tag, <a href="
%code-here%>Click to scroll</a>

Spenze said...

Just came here to say thanks!!! It's a great little too for what I need. I want to add this on my site (mostly older literatures) for people to read without scrolling, any chance I can get the source code?

Tim Harper said...

Sure: https://gist.github.com/4062111

Anon said...

Just wanted to say thank you.

I spent several hours looking for an ereader for Windows desktop that would do exactly this, as the majority of my ebooks are in html format.

Instead, you gave a solution that I don't even have to download an would work for ordinary websites too.

Thanks again!a

Anon said...

Just wanted to say thank you.

I spent several hours looking for an ereader for Windows desktop that would do exactly this, as the majority of my ebooks are in html format.

Instead, you gave a solution that I don't even have to download an would work for ordinary websites too.

Thanks again!

Joe Baccash said...

What a great tool! I will be using it regularly. Thank you very much. It also works well on Chrome. Is anyone aware of a similar tool for ios mobile safari/chrome?

Thanks again.

Fimbar Cyrille said...

Thanks it's good to see non greedy people, you are blessed. I walk my clouds for heaven on earth. I'll remember you. Luton, UK. Peace be with you!