A little while ago, I posted a Firefox bookmarklet to hide items on a delicious links page that bore a particular tag (deliHide). Here's another quick delicious bookmarklet that will do a URL rewrite for you...
What do I mean? Well, if you look at my OUseful Redirects page, you'll see a whole load of shortcuts that I dangle off the ouseful.open.ac.uk path that I can use to take me quickly (and via a memeorable URL) to pages that are hard to remember the location of.
For example, the easy http://ouseful.open.ac.uk/txr174 will take me straight to the course catalogue page for TXR174 (http://www3.open.ac.uk/courses/bin/p12.dll?C01txr174) which has a less than memorable URL.
The key to this is a URL rewrite. The only problem is that I need to get to the server to be able to add more of these.
TinyURL does something similar, although the focus here is on providing a short - if cryptic - URL in place of a long one. You often see TinyURLs in newspaper and magazine articles, for example.
Anyway, tonight's quick hack is a kludged Firefox bookmarklet that will look for a link on a page that is tagged with usr:redirect. As soon as it finds one, it will extract the URL of that usr:redirect tagged page and load it in to the browser window.
Now I know this is an abuse of the tagging system - it encourages single use tags, for example. But it does demonstrate another way of using a social bookmarking system! ;-)
Anyway - for what it's worth - here's my deliURLreWrite bookmarklet.
The real idea, of course, is that this function would be useful in a Greasmonkey script, but I leave that as an exercise for the reader (or until I get another spare quarter of an hour!). Couldn't resist... here it is: delicious URL rewrite Greasemonkey script. NB you may also want to lock the script down to your delicious username... and remember, if you have a link with a >em>url:redirect tag listed on a page, that's where the page will go as soon as it's loaded (which is actually a bit clunky...) I wonder whether, if there are several usr:redirect tagged links on a page all of them should be opened in separate windows/tabs?
And the purpose of the script? So I could write something like http://del.icio.us/psychemedia/thisPage and get taken (redirected) straight to whatever page (with its horrible and unmemorable URL) I had tagged as thisPage.
So maybe I need a new delicious account turned over solely to URL rewrites? ;-)
Posted by ajh59 at May 5, 2006 08:31 PM