View Single Post
  #1  
Old 12-Oct-2005, 17:35
Tonio600's Avatar
Tonio600 Tonio600 is offline
Registered Forum User
Ducati in my Blood
 
Posts: 4,379
Join Date: Dec 2004
Mood: What a wonderful world.
[geek stuff] bookmarklet to get you train times in 3 clicks...

I'm quite lazy and became very quickly bored with the national rail enquiries website... I wanted a quicker way to get my train times when I'm leaving the office (do I have to run or not?? ), so I wrote my first bookmarklet. Just create a new bookmark in your browser (or a favorite if your using Microsoft's browser) and copy-paste the following line (the whole line) in the URL property (by changing the default stations for yours, except if you're one of the 7 people doing Leatherhead -> Holmwood everyday )

Quote:
javascript:from=window.prompt('From?','leatherhead ');to=window.prompt('To?','holmwood');location.hre f='http://southwick.dyndns.org/nationalrail/?from='+from+'&to='+to

My server (southwick.dyndns.org) is just used to convert a GET query to a POST one, for your query to be compliant with the national rail enquiries website. Don't worry, there is no virus in that line. That's is it, that was the bored topic of the day which may just interrest other geeks.
Quote+Reply