Bookmarklets

Not a day goes by without the need at some point to look up a location on Google Maps (UK). Despite the obvious benefits of the quick search bars in All Modern Browsers, I’ve not really taken to them. In theory they’re a great feature, but I find that they make me think too much. Like so:

  1. pull down the list of search engines
  2. scan for the one I want
  3. type and go

To reduce friction when searching in common places I have the following bookmarklets defined.

Google Maps

javascript:p=prompt('GMaps%20search:');if(p)%20{%20p=p.replace(/\./g,%20'/');window.location='http://maps.google.co.uk?q='+p.toLowerCase();}

Dictionary.com

javascript:void(location.href='http://dictionary.reference.com/browse/'+prompt('Dictionary.com%20search:',''))

Prototype API

javascript:p=prompt('Prototype%20API%20search:');if(p)%20{%20p=p.replace(/\./g,%20'/');window.location='http://prototypejs.org/api/'+p.toLowerCase();}

To use these JavaScript snippets, assign them to a bookmark in your browser. For ease of access, place the bookmark on the Bookmarks Toolbar. This reduces the workflow to:

  1. click the bookmarklet
  2. type and go

It’s not rocket science. A simple Google search reveals all sorts of much-more-advanced bookmarklets. As far as bookmarklets for straightfoward searching are concerned, any more than three or so would feel like too many to me, and I’d opt for the browser’s quick search bar.

Leave a Reply