Geocaching with decimal degrees
My first GreaseMonkey script provides decimal degrees for cache locations. [Update: now to five decimal places.]
The cache pages at geocaching.com provide latitudes and longitudes in degrees and minutes (e.g., “N 42° 17.853”). I find that I often want to convert those coordinates into decimal degrees (e.g., “42.2975”) to plot them together on maps, to calculate distances between them, etc. I did it by hand a number of times before I discovered that the easiest way is to peek into the mapping URIs further down on the cache page.
But that's still a little bit inconvenient, and isn't this exactly what Greasemonkey is for?
Given that I've started to feel a little left out as I haven't written any fancy DHTML interfaces or jumped on the Ajax bandwagon to write the all-singing, all-dancing interactive DocBook web site, I thought that writing some Greasemonkey code would make me feel a little more relevant.
I was right. And now I have a script that adds decimal degrees to the pages in question. See?

It's probably embarrassingly bad JavaScript coding, but that's what you get for a lunch break exercise at a working group meeting. Improvements accepted.
[Update 1 May 2006: Carl's right, four decimal places wasn't really enough. I've updated the script to provide five, padded with zeros if necessary.]
Comments
installed! nice!
Nice work, but a nitpick: your web server isn't saying what character set the script is in. The degree symbols are messed up in my browser.
(fortunately they're only in comments, but I said it was a nitpick!)
Nice catch, Brendan. Fixed.
Great idea! Can you tweak the script to make it 5 decimal places rather than 4? Four decimal places (10,000ths of degrees) is grainier than DD MM.MMM format (60,000ths of degrees).
Thanks, Norman! Five digits and trailing zeroes are great additions.
With all the updates to gc.com & Firefox, this has stopped working. Any updates planned? I loved this script! Thanks in advance.
It still seems to work for me. What page were you on where it didn't work?