Sunday, June 05, 2005

gmail smart-delete button

wow, i can't believe i haven't posted since january! i guess i must have been busier than i thought :) anyway, here's a little quickie for you gmail+firefox users out there.

i've been using gmail as my main account now so i get tons (well maybe not tons =P) of emails every day. most of them are automatically archived and applied their respective labels while some are captured by gmail's built-in spam filter. every so often i get some junk email (to me at least) that isn't caught by the filters. so what do i do? move it to trash, of course.

this two click process (click on the more actions drop down and then click on move to trash) is not too annoying if it's just one item. it starts to get irritating when there are a lots of them. i mean, it's probably fine if i can immediately tell from the subject that an email is junk but more often than not, i'd have to open the email first to be able to tell. it gets worse, of course, sometimes these messages span several pages (i know, i know, my fault for not cleaning up my inbox more often :D)! that's when it gets downright irritating!

i'm probably whining about something you don't mind at all. unlike me, you can probably spare the extra second to make that second click. but if the convenience were available, why not take advantage if it, right?

first of all you have to be using firefox. (what do you mean you don't know what firefox is? are you from the dark ages or something? :D) if you're not using firefox then i'm sorry but i can't help you, but if you are, here's what you need to do:
1. install greasemonkey
2. restart firefox
3. visit paul's blog
4. right click on the script and select install user script*

*sometimes this step doesn't work right. as an alternative, you can just click on the link to open the script in your browser and then go to tools (the menu on top, the item beside help) and click on install user script.

it's a great script my only problem with it is that it places the delete button right before the archive button. i'm a creature of habit so and i'm so used to the archive button being the first one that i'm sure i'll accidentally click delete (all the time!). here's a little modification i did to paul's script to address this:

changed line 101 to:
    if (0==id || 1==id) insert_point=insert_point.nextSibling.nextSibling.nextSibling.nextSibling;

added the following right after line 102
    if (2==id || 3==id) insert_point=insert_point.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling;