« Seattle Post Intelligencer Going Web Only | Main | Abstracted Daffodil #2 »

I made stuff!

I love tumbling through Tumblr.com looking at all the crazy stuff people post (and the smut -- I'll admit it) but I don't like their navigation.

I'm a keyboard user: hate the mouse, despise the track pad. So I wrote a handy GreaseMonkey script to add accesskeys to the next and previous page links at the bottom. I like it.

Tumblr add access keys but you will need to install GreaseMonkey for Firefox first. It's easy, the site will walk you through it.

The entire script is much simpler (simplr?) than I thought. I think I spent more time looking up all the javascript stuff I've forgotten over the years than actually writing it. Ah well.

// ==UserScript==
// @name           Tumblr add access keys
// @namespace      http://negativespace.net/msj
// @description    Add access keys to the Tumblr "Next page" and "Previous page" links.
// @include        http://www.tumblr.com/dashboard
// ==/UserScript==


// TODO: make this stuff configurable.
var nextID = "next_page_link";
var nextKey = "m"; // m is closer to the ctrl key on a querty keyboard.

var prevID = "previous_page_link";
var prevKey = "n"; // n won't be used as much, it can be further away from ctrl.

// ------------------------------------- 
// This is where the magic happens.
var nextLink = document.getElementById(nextID);
nextLink.accessKey = nextKey;
nextLink.innerHTML += " [" + nextKey + "]";

var prevLink = document.getElementById(prevID);
prevLink.accessKey = prevKey;
prevLink.innerHTML += " [" + prevKey + "]";

TrackBack

TrackBack URL for this entry:
http://www.negativespace.net/cgi-bin/cgiwrap/negative/mt3/mt-tb.cgi/2645

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on March 16, 2009 9:38 PM.

The previous post in this blog was Seattle Post Intelligencer Going Web Only.

The next post in this blog is Abstracted Daffodil #2.

Many more can be found on the main index page or by looking through the archives.

Flickr Photos

www.flickr.com
Powered by
Movable Type 3.33