Sunday, March 18, 2012

Enhancing Geocaching.com with Greasemonkey & Tampermonkey Scripts

Back at the start of the year we saw some historic rainfall here in the United Kingdom.  Rivers burst their banks and huge swathes of the countryside were under several feet of water.  It made planning the weekly geocaching trip even more difficult – I didn’t want to do a twenty mile circular walk only to find the final mile back to the car blocked by floodwater.

It was in my frustration of consulting governmental flood maps and correlating them with geocaching maps that I discovered the wonderful world of the Greasemonkey or Tampermonkey script.

Greasemonkey and Tampermonkey are plugins (for Firefox and Google Chrome respectively) that allow you to install scripts to modify your favorite web pages.  It all sounds a bit complicated but in essence they allow you to do things such as get Google Search results to appear in two columns rather than just one, or show the buffer speed of the YouTube video you are watching.

 

Scripts can enhance your view of the geocaching site

Scripts can enhance your view of the geocaching site

When it comes to Geocaching there are a number of scripts available.  They range from giving your browser the ability to bring up cache pages by simply typing the GC Code into the search box, to adding more options to the Geocaching Maps page.

There are a number of downsides to using Greasemonkey and Tampermonkey though and you should not proceed without considering the implications.  By installing scripts, you are giving Greasemonkey and Tampermonkey the permission to alter the web pages that are presented to you.  Whilst the more technically minded of you will be able to read the source script and see if there is anything malicious, those of you who are not need to ensure you are sensible when it comes to finding and installing scripts.

Greasemonkey and Tampermonkey take the html code from a website and alter it to display in your browser.  Because of this, if the Geocaching.com website or your browser updates, it could break the script.  If it does, you can simply disable it, but these scripts have been created by the community and as a result scripts get abandoned or developers may take a time before issuing updates.

This is what a cache looks like with GCVote

This is what a cache looks like with GCVote, one of my preferred enhancements for geocaching.

Up until recently there was a great repository for scripts at Userscripts.org.  At the time of writing, however, the site has ceased.  As a result, there’s now no longer one repository for all Geocaching scripts, and ones that are out there quickly become outdated as scripts break with updates and developers abandon projects.

That said, maybe I’ve just been lucky or the developers of the scripts I use are quick at issuing updates, but I’ve not had an issue so far.

So how do you get started?  Well the first step is to install Greasemonkey or Tampermonkey.  If you use Firefox you can find the Greasemonkey add-on here.  For those of you using Google Chrome, visit tampermonkey.net and add the latest stable release.  You’ll get the usual “Do you really want to install this?” confirmations, and it’ll most likely throw up some scary warning about the add-on being able to alter the appearance of websites (That’s OK, it’s what we want it to do)

Next you want to install a script.  A couple I recommend are Geocaching Map Enhancements and GCvote.
However, it’s worth asking around as many are localized.  For example there’s a profile modification userscript for a series we have in the United Kingdom called Church Micros which are a bit like the ‘I See Dead People’ geocaches often found in the US, except that there’s a l
eague table and stats.  monkey3And then there is the userscript that overlays current UK flood warnings over the Geocaching.com map that proved a Godsend to me at the beginning of the year.

You may find that in your region or country someone has developed specific userscripts, so it’s worth asking around.   I’d also encourage script writers to promote their scripts in the comments below.  I’m sure there are loads of current scripts that I’ve missed.

Of course, if you are an expert in writing Javascript and can think of some useful niche scripts currently missing, why not write your own?  I’m sure you’ll find a willing audience for them.

About Adrian Faulkner

Adrian Faulkner is a writer of both fiction and non-fiction. He is an active geocacher with over 9000 finds to his name. You can find more by Adrian at AdrianFaulkner.com and on his Google Plus page.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

*


× 1 = five