Exploring Thoughtz..

GreaseMonkey Script #1

Posted by: Vijay Dev on: March 16, 2009

I wrote my first GreaseMonkey script this weekend !! The script runs on GMail and results in showing only those labels which have at least one unread mail in them.

A GM script for doing the same already exist but had some problems since it uses the HTML classes and XPath to manipulate the DOM. I avoided using XPath and instead used the GMail-GreaseMonkey API which is still experimental. The API is not completely reliable as well as its not always working right. Yet I wanted to stick with it just for the fun of it :)

Though the script is not perfect yet and hangs the browser sometimes, I am happy about the fact that I finally shrugged off my laziness and did something useful after a long time :P

PS :  The title is to motivate myself to write some more scripts soon ! !!

Leave a Reply

Blog Stats

  • 22,081 Visitors

  • Yann: Hello! Could you expand your example for the a bit not-so-hapy java users like me, and describe how to compile and run your code? That would be awesom
  • Anuraj Pandey: Some one is mis-using my id..i got the notification of the above comment..however i havent posted the comment :(
  • Anuraj Pandey: if u have some kind of pdf/text of the material u removed..it will be highly appreciable if u help me..i have my first google intern telephonic interv

My Tweets

About Me

Journey so far…