Jump to content

Greasemonkey...


Recommended Posts

Firstly, this post may only appeal to small minority who satisfy the following criteria:

1) you use Firefox as your main browser

2) you've always wished that instead of just saying "British Grid: TL 11855 26471" on the cache information page, it actually linked to an OS Map.

 

Still reading? Well, there's a groovy thing for Firefox called Greasemonkey which lets you modify webpages before they are displayed to you, so you (or someone infinitely sadder, like me) can add in all the functionality you wish was there.

 

So first, you go and install Greasemonkey from here http://greasemonkey.mozdev.org/

 

Then you restart Firefox, and go here http://files.dixo.net/GeocachingOSMap.user.js - page may look like gobbledegook, but stay with me: click Tools -> Install User Script in Firefox and you're done.

 

From now on, the grid reference on cache information pages will be clickable. How nice is that? I'm sure there's all sorts of other useful things that could be done, but this is just something I've wished for - feel free to suggest upgrades!

 

(Edit - here is a screenshot which illustrates the above:)

 

GeocachingOSMap.gif

Edited by lordelph
Link to comment

Excellent add on!

If you want to see cache positions on an OS map - use this!

It does require you to use Firefox instead of your present browser, but that's no bad thing! I'm not anti Microsoft (I make my living using Microsoft developer tools) but Firefox is just a better browser! This add on makes it great for UK geocachers!

Now let's see the wish list start to develop...

littlejim

Link to comment

What's wrong with viewing cache pages through GeocacheUK? They've been adding in the links to the maps for years :o.

 

You can also go straight to a map from any cache details shown in GSAK. You can also log your cache visit straight from GSAK, and loads more.

 

I do use Firefox occasionally, but I prefer the way that IE works.

 

Thanks for the info :o

Link to comment
I do use Firefox occasionally, but I prefer the way that IE works.

Tabbed pages are enough to make me switch (I know they are in IE7 - Firefox must have Microsoft on the run!) - also, I find it much quicker to load.

I use geocaching.com directly for most of my transactions, so having the facility straight from the cache page is a benefit!

Link to comment
my greasemonkey script links to the 1:25000 scale map on the OS website.

Crikey, that is cool (1:25k). Looks elegant as well. Thanks for the screen shot.

 

I must admit the tabbed pages in Firefox is the bit I don't like about it, so if they are making IE7 do the same there's no reason not to use Firefox, lol. I much prefer the image resizing in Firefox, but that's just about the only obvious benefit to me. This adds a bit of ammo to it, nice one.

 

Stuey :o

Link to comment
where am I going wrong?

You must restart Firefox after installing Greasemonkey - make sure you close all open windows and then start it again.

 

If the extension is installed, you should also see it listed under Tools -> Extensions

 

Don't think I should comment about Firefox / IE as I think it's off topic

Yes, I certainly don't intend to touch off a holy war about browsers - this topic is aimed squarely at existing Firefox users!

 

pity the OS page doesnt have a pointer like streetmaps

I'm working on it!

Edited by lordelph
Link to comment
If the extension is installed, you should also see it listed under Tools -> Extensions

 

Not on mine it isn't!

 

Firefox locked up, had to use TaskManager to shut it down, would not restart, had to re-install Firefox.

 

Process repeated again with same result. Drat!

 

I installed an (automatic) upgrade to FF this evening - anything to do with this result?

Link to comment

Very slick, and very nice.. Thanks for that!

 

For those who favour IE over FireFox, BTW, one of the major benefits of FF is that it is immune to most of the pop-up and self-installing cr*ppy ad-ware that IE is so prone to picking up..

 

Speaking as one who has used every version of IE since it first appeared, and Windows from 1.0 (yes, it didexist :o) FireFox is definitely worth a go. As it installs alongside IE, rather than replacing it, what have you got to lose?!?

Edited by Hampk
Link to comment

Got it working eventually. Didn't notice at first that Firefox was blocking the install.

 

Then it wanted to download and save it but nothing would run it.

 

Tried again and this time it asked to install. Everything was fine after that. Thanks for the tip.

 

Oh and I tried this on a Sunday Evening when GC.com is on life support. Picture the scene in casualty, "Well there's been no output for 15 minutes, are we all agreed?? Time of death 9.17".

Edited by kbootb
Link to comment
So first, you go and install Greasemonkey from here http://greasemonkey.mozdev.org/

It won't install. It can't decide between blocking it from being downloaded, or allowing me to save or run it. There is nothing installed which will run a .xpi file on my machine apparently? So I'm stuck. Any help please?

 

Edit to add: Ahh "Edit options".. all the way over there on the right hand side :o. I'm on a roll now, cheers.

Edited by Stuey
Link to comment
and Windows from 1.0 (yes, it didexist)
It wasn't called 1.0 of course in those days. I went on the first Microsoft training course for Windows (1) - we chose it in preference to Gem from Digital Research because the DR support team (person) was in hospital in Oxford with a broken leg!! I am still selling a product originally designed for Windows 1!! Getting off topic, better shut up...
Link to comment
It won't install. It can't decide between blocking it from being downloaded, or allowing me to save or run it. There is nothing installed which will run a .xpi file on my machine apparently? So I'm stuck. Any help please?
If I remember correctly, you have to include the Mozilla (or wherever) website in the list you allow installs from...
Link to comment
and Windows from 1.0 (yes, it didexist)
It wasn't called 1.0 of course in those days. I went on the first Microsoft training course for Windows (1) - we chose it in preference to Gem from Digital Research because the DR support team (person) was in hospital in Oxford with a broken leg!! I am still selling a product originally designed for Windows 1!! Getting off topic, better shut up...

I believe that Bill Gates owes his success to a similar story - something to do with flying Gary Kildall of Digital Research being too busy flying his plane when IBM were looking for an operating system :o

Link to comment
It won't install. It can't decide between blocking it from being downloaded, or allowing me to save or run it. There is nothing installed which will run a .xpi file on my machine apparently? So I'm stuck. Any help please?
If I remember correctly, you have to include the Mozilla (or wherever) website in the list you allow installs from...

Absolutely correct! Got it working - lovely addition too.

 

After "adding" the site to the list via Tools/Options/Web Features/Allowed Sites, I was indeed able to add the GreaseMonkey Extension. It was listed under Tools/Extensions as described.

 

I closed down Firefox - and it smartly refused to open again! A quick reboot of the PC, running the script and bingo! All working as advertised.

 

Well done Lordelph for sharing a super add-on to the site and Littlejim for showing the way...

 

...and thanks for a most positive and constructive thread.

 

...and if you need a beta tester for any future wizzy bits, gimme a bell.

 

Ta!

Link to comment

Lacto & Ecko...

 

...any chance of pinning this very handy thread to the top for a while to enable others to spot it and reap the benefits of Lordelph's super work?

 

After all, he has kindly shared his efforts to all the players but the thread is getting swamped out of sight.

 

I feel it would be appropriate that as many as possible get to see the thread and LD gets due credit for his contribution ...before the thread get trampled down and gets lost to the masses.

 

Keep up the sad work LD...

Link to comment

Now with added Google Maps goodness

I had a request from our American friends to add Google Maps support, which turned out to be pretty easy. Amended screenshot is at the top of this thread.

 

Google Maps is great for the US with it's excellent satellite imagery, but this feature isn't available in the UK yet, so no satellite link for UK caches. Hopefully they'll put something similar together for us.

 

Please note I've changed the name and URL of the script to better suit what it is turning into, so....

 

Uninstall old version first...

If you've already installed the old version (GeocachingOSMap) go to Tools->Manage User Scripts, highlight GeocachingOSMap in the left hand column, and press the Uninstall button at the bottom of the dialog. I'll stick with the new name so future upgrades will be less painful.

 

Installing the new version...

http://files.dixo.net/GeocachingMapLinker.user.js - right click that link and choose "Install User Script" (good tip Mr Trotter!)

Link to comment

Lordelph, this is great, as with many people I don't have Firefox, and I don't like changing things on the computer, as far too many times it goes wrong.

 

If I remember correctly Jeremy had said a while ago that we would get links to OS maps, but they have never materialised.

 

With this in mind and you coming up with this solution, I have started a thread here requesting for the links. Using this topic as a precedence.

 

I hope you don't mind??

Link to comment
I may have missed something, but what's wrong with the streetmap link on the cache page? It works OK for me.

The streetmap links to the OS 1:50,000 mapping, this tool links to the 1:25,000 maps at Ordnance Survey's get-a-map. The detail on 1:25,000 is much better when you're on the ground.

Link to comment
I may have missed something, but what's wrong with the streetmap link on the cache page?  It works OK for me.

The streetmap links to the OS 1:50,000 mapping, this tool links to the 1:25,000 maps at Ordnance Survey's get-a-map. The detail on 1:25,000 is much better when you're on the ground.

I was responding to Haggis Hunters post, regarding the link to OS maps.

Sorry, I didn't include the quote.

The bigger scale is better but there is a link to OS mapping via streetmap.

Link to comment

This is great. I had a bit of a mare installing greasemonkey, and had to download the script to my desktop, as I kept getting an error about not being able to download the script, despite the fact that I'd added the website to my allowed sites list.

 

After that it was plain sailing.

 

Thanx for a great add on.

 

Adrian ;)

Link to comment

Excellent utility, I shall be using it. There is one tincy little thing, however... It's actually against GC.com T'c and C's to use it. :huh:

You agree that you will not use any robot, spider, scraper or other automated means to access the Site for any purpose without our express written permission.

 

And, by the looks of things, this plugin is actually a scraper!.. True, I'm sure that Groundspeak wont mind, however, as This sort of technology could allow people without premium membership to use premium like features, they may take measures to prevent it been used.

 

Sorry to be a party pooper! :D

Link to comment

Just to clarify, my greasemonkey extension is not a robot or scraper, since it uses what your browser is already presenting to you. No additional requests are made, and no information is stored in a "non-gc.com" retrieval system.

 

While it would be possible to write a GreaseMonkey extension to add new gc.com features which *did* break the T's & C's, this isn't one.

Link to comment

I confess I have not looked into the script in detail, but if what it does is modify the working of your browser so that it displays an additional link to associated data - I can't see how that is scraping. It doesn't seem to download anything from GC.com that Firefox would not have downloaded anyway. In fact, instead of scarping, it seems to be whatever the opposite of a scraper is - insetead of stealing data from a website and doing something with it, it takes the data the user gets from the website in the normal way, and adds additional functionality to it.

 

If you mean that Greasemonkey could be used to run scripts that could generate GPX files, there are much better ways of doing that using real scrapers people have written.

Link to comment
I am struggling with this. :lol:

 

I installed the greasaemonkey fine, and then the script, but it never loaded an OS page. When I clicked on the OS link it just reloaded the gc.com page.

 

I then installed the script referred to in the later posting, and have lost even that - and no Google map either. Any suggestions anyone?

Ditto..........

Link to comment

This is a fantastic script!

 

I too had problems with the popup OS map not appearing - managed to fix this by editing the script. (You can do this by clicking on... Tools -> Manage User Scripts -> Geocaching Map Linker -> Edit - you might need to set up Windows so that .JS files are associated with notepad first.)

 

I changed the following line:

 

function _popupOSMap(gridref)

 

to:

 

window._popupOSMap=function (gridref)

 

(After reading the advice at this link).

 

It works fine now!

Link to comment

Good suggestion, I've modified the script. To install or update, right click this link and choose "Install User Script". A dialog will appear showing the script name and the pages it will modify - to confirm you want to install, you must click the button with "OK" written on it.

 

If after reading the dialog you decide you do not want to install the script, click the button with "Cancel" written on it, which can be found just next to the button with "OK" written on it.

Edited by lordelph
Link to comment

HEEELLLLPPP!!!!!

 

My Monkey is broken... :lol::blink: :blink:

 

The link still appears on the OS numbers, but it will not go to the page, it just opens the current page again in the same window...

 

Please can some kind soul help fix my greasey monkey?

 

Matt

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...