Dictionary bookmarklet

I use this really basic Firefox bookmarklet pretty much every day, so I thought I’d post it.

–> Dictionary.com <– drag to toolbar

Dictionary.com provide an ‘official’ bookmarklet, here:
http://dictionary.reference.com/tools/bookmarklets.html

I’ve improved it a bit

  • Selected text uses window.getSelection(), not document.getSelection()
  • Trims junk out of current selection
  • Opens a new window so you don’t lose the current page
  • Uses encodeURIComponent(), not escape()

Here’s the uncompressed source on Github