16 May 2006

A Mozilla / Firefox keyword for the Dutch telephone directory

I just love Mozilla / FireFox Keywords. If you use one of those browsers and if you live in the Netherlands, do the following:

  1. Bookmark this piece of javascript:
       
    javascript:var%C2%A0s='%s';url='http://www.detelefoongids.nl/tginl.dll?action=white&type=search&resultsperpage=25&pagestart=1&name2=%s&city=%s&source=homepage';t=;qc=0;chunks=url.split('%s');for(i=0;i<s.length;i++){if(s.charAt(i)=='"')qc=qc^1;t+=((s.charAt(i)=='
    '&&qc)?'^':s.charAt(i));}args=t.split(/\s/);nurl=;for(i=0;i<chunks.length;i++){nurl+=chunks[i];if(args[i]!=undefined)%C2%A0{args[i]=args[i].replace(/\^/g,'
    ');nurl+=args[i];}else{nurl+='eindhoven';}}location.replace(nurl,'<BR>');


    That means, right click on the link and click ‘Bookmark this link...’, then enter a name for the link (e.g., ‘Telefoongids’) and choose a folder where to save this bookmark. You will only need to click it once, so it need not be an easily accessible folder. I have a special folder for Keyword links.
  2. Left click on the Bookmarks menu item, select the folder you put the link into, right click on that link and select Properties.
  3. Type the keyword that you’d like to use, e.g. tel, into the box labelled Keyword.
  4. Click OK.
Now if you want to have the phone number of, say, Mr. Meijer in Amsterdam, you type tel meijer amsterdam into the address bar of the browser and it takes you to the phone book page of all people called Meijer in Amsterdam (there are about 1200 of them). If you only type a name, you get the people in Eindhoven called that (to change this, edit the properties of the link again, scroll through the url until you find the text eindhoven and change it into your favourite city name).
This is an adaptation of a script on a mozillaZine page that has it from a bugzilla page again. Note that this does not yet work if you are looking for Mr. De Vries or for someone in The Hague, because there are spaces in both those names. If you type tel "de vries" "den haag" the script understands that, but the web server does not understand the way the script tries to say it. Please email me if you've solved this!

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home