Thinkgeek Gadget for GoogleFor a long time Google has been offering so-called gadgets that you could put on your personalised homepage. Thanks to the gadgets you get the weather report, google video, digg news or a calender to your homepage. Not so long ago Google published a new feature: now it is even possible to put those gadgets on your real homepage.

Of course there are lots of official and even more unoffical gadgets in the directory, but you know what is missing? A gadget for Thinkgeek, the ultimate gadget store (to be exact: there are rss-feeds for thinkgeek you can add to your google homepage, but not real gadgets). So why not create one?

The Google API pages offer extended information on how to build a gadget. The main part of every gadget is a small xml definition of the gadgets properties, requirements and perhaps code. The recommended way of filling the gadget is by putting html and javascript directly into this xml file. Unfortunately I was unable to build my gadget that way because I always got a javascript error in the google code. As always the Google code is badly scrambled so I didn’t spend much time looking for the error. (Anyways, if anyone finds a solution to “ig_a[ig_g] is not a function” - send me a mail)

Another way to build a gadget is by simply specifying a url that contains the gadget content. After javascript didn’t work I went to build a simple perl script that parses the thinkgeek rss and generates an html output. This worked fine and the gadget now displays a random thinkgeekd product on every load.

If you want to give it a try, click here: Add to Google