gmailtipYesterday I was trying out a very useful sounding tip for adding a bookmarklet that would very quickly (in 1 sec or so) pop up a gmail compose window without all the contact and inbox stuff. Better yet, it would have all the auto-complete contact info as well so it’s very useful if you want to fire off an email without getting distracted by all that other inbox and chat stuff.

Unfortunately, I couldn’t seem to get it to work. I think it required having a Google gadget of some sort (I don’t use Google Gadgets) or iGoogle or Google Desktop or some other such nonsense. In any case I couldn’t get it to work in Chrome (my main browser here at work). But luckily in the comments to the post, someone provided a script to enter into the bookmarklet url (once the bookmarklet is up there in the bookmark bar, just right-click and choose edit). Once I pasted in that script it works like a charm. Supposedly it works in Firefox too (although I haven’t tried it). Here’s the script I pasted in:

javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("https://mail.google.com/mail/?view=cm&fs=1&tf=0"+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();

ps. Okay I give up. I’m not sure how to get the above code snippet to display properly in my blog. I’ve tried the ‘pre’, ‘code’, ‘blockquote’ and even tried the CodeHighlighter plugin. All to no avail. Is there something I should be putting in my CSS file to tame the above monstrosity so that it obeys wordwrapping on my blog?