When getting driving directions from such a website, I mostly use my home address as the departure address, so I figured it would be nice to have the site remember that info. A cookie set by the website wouldn't work too well because I delete cookies when I close Opera. UserJS was my next option.
After examining a few dozens of route planners, I found out they all use code similar to this:
<label for="startStreet">Street:</label> <input type="text" name="startStreet"> <label for="startCity">City:</label> <input type="text" name="startCity"> <label for="startZip">Zip:</label> <input type="text" name="startZip"> <label for="startCountry">Country:</label> <select type="text" name="startCountry">...</select>
Of course, they all use different names for their elements; some sites use the id attribute instead. Some let you enter a State or Province (using either an <input type="text"> or a <select>); others ask for the house number and street name separately.
In short, there's little the route planners agree on.
And then there was another problem I had to solve if I wanted to write a script that would work with them all: in The Netherlands, the house number comes after the street name; in the US, they're reversed. In France, they put a comma between them. Furthermore, a French route planner may know what "Norvège" is, but a British one can only work with "Norway".
Finally, this is what I've done:
I have written a JS function that will figure out which element types have been used to contain the address info. Its input parameters are the names or id's of these elements. The function will get the correct information from an array that stores the street name, house number, zip code, city, state and country separately. The country is again an array consisting of several equivalents (in different languages, for instance). The user also sets what the right street address notation is (which can be overridden for specific sites)
Once I completed the function, it was relatively easy to make it work on the following sites (note that some pages simply use some other site's route planning service):
The AA Route Planner
Autobahn Tank & Rast
BP The Netherlands
BP Route Finder
CNN Driving Directions
Drive Alive! Route Planner
Green Flag Route Planning
Letsmove.be (also in French)
Maps On Us
MSN Mappoint / Mapblast
Opel Route Planner
RAC Route Planner
Rand McNally Maps & Directions
Reiseplanung.de / Routenplanung.de
Routenet.nl / Routenet.be
Strassenroutenplaner.de / Strassenkarten-Europa.de
SuperPages.com / BigBook.com
Touring.be (also in French)
VTB/VAB.be (also in French)
Yahoo! Deutschland Routenplaner
Yahoo! Driving Directions