team/credits: Brigit Lichtenegger, Martijn van Buul

Screenshot of QuitStats in a Google Personalized Homepage
Screenshot of QuitStats in a Google Personalized Homepage

I just quit smoking, and wanted to have a look at google gadgets, so I made a homepage gadget that displays how long I've been quit, how many cigarettes I haven't smoked, and how much money and life I saved.

A gadget is a mini-application that users can add to their Google personalized homepages.
The gadget is ported from Martijn van Buuls smoketimer, a program for linux, written in C. The main modification is ofcourse the possibility to add it to your personalized homepage, so you can keep track of you changed lifestyle everywhere and on any platform. Besides this I added a setting to specify the verb that expresses how you've taken your 'poison', so you can use the tool not only for quitting smoking things, but also drinking, eating, playing, whatever...

To add the QuitStats gadget to your Google personalized homepage just click this button.
Add to Google

(If your statistics don't show up correctly, check your javascript settings. The ScriptBlock extension for example, doesn't allow javascript to get data from another domain, and homepage gadgets collect their data from gmodules.com.)

My quitting details are the default settings, so if you just want to keep track of my efforts you're done :-). When you want to follow your own (or someone elses) quitting statistics you need to configure the gadget. To do so click "edit" at the top of the gadget. This will open the Preference Editor, which allows you to enter the information needed for the correct calculation and display of your stats.

Screenshot Showing The Preference Editor
Screenshot Showing The Preference Editor

Name: Your name.
Unit Name: The stuff you've been taking ;-) Could be cigarette, could be game, could be...
Verb: The verb expressing how you've been taking your units. Could be smoked, could be played, could be...
Units per Day: Number of taken units per day.
Price per Unit: The price of each unit in the currency of your choice.
Currency: The currency of your choice.
Life per Unit: Amount of time you've saved in seconds. This could be time you've spent doing something more useful, or actual life you save related to health issues.
Stop Time: Time when the attempt was started. The format can be any string recognized by the Javascript Date object. The format I use is mm/dd/YYYY hh:mm GMT+/-hhmm. Don't forget to specify the timezone offset if you're keeping track of a friend in a different timezone.

It is possible to add multiple QuitStats gadgets to your homepage, so you can keep track of many friends and habits.

The gadgets source code is under the gpl license.