Friday, December 6, 2013

Random: How to Add a Task Name in the E.gg Timer at E.ggtimer.com



I love the online E.gg Timer webapp at E.ggtimer.com, and one feature I thought was missing is the ability to specify a task name. Without it, using multiple timers is confusing. As it turns out, that feature has been implemented for E.ggtimer.com already! As explained in the E.ggtimer.com GitHub Issue list (https://github.com/lemieuxster/eggtimer/issues/6), you can add a task name by specifying it in the URL as follow:
http://e.ggtimer.com/10minutes/until/Party+Time!
For my own use, I prefer to invoke E.ggtimer from the address bar (i.e., url box) of the browser. Because this requires 2 arguments to be specified, I have to use bookmarklets and a method described by Gina Trapani way back in 2007 (http://lifehacker.com/240552/firefox-tip--how-to-set-up-multi+parameter-keyword-searches).

Here is how I set up my system:

1. First, the bookmarklet (this is all in one line) you need is:
javascript:var%C2%A0s='%s';%20url='http://e.ggtimer.com/%sminutes/until/%s';%20t='';%20qc=0;%20chunks=url.split('%s');%20for(i=0;%20i');
2. Then, in Firefox, create a new bookmark. Put the above text into the location box, and specific your preferred keyward.
3. To test it out, type: "et2 20 study Econ"
4. And voila!


This would also work in Chrome. Instead of setting up the bookmarklet as a bookmark, you will need to do it in the "Manage Search Engines" section of the Chrome settings.
Unfortunately, one issue I have is that the bookmarklet does not work when there are no tabs in Firefox. Thus, in the example above, I have one tab opened to a webpage. The other issue is that the script didn't like the regular space. I.e., that "study Econ" turns into "studyEcon." You can get around it by using "study%20Econ" instead.