Thursday, October 26, 2006

"Gmail This" Bookmarklet (in a tab)

I picked up the "Gmail This" bookmarklet a while ago and use it alot (also see Lifehacker). But I noticed two things recently when I upgraded to Firefox 2.0.
  1. The popup window does not focus in the front when activating the bookmarklet.
  2. I realized I don't like popup windows in the first place! I noticed the new "Email This" Firefox add-on opens a new tab. I wish I had a simple bookmarklet that opened a tab (without installing an extension).
So I realized I ought to modify the javascript in the bookmarklet myself, to get what I want. This version will simply do a document.open() and if "New pages should be opened in: a new tab" is selected in your preferences (which is the default), then Gmail will open in a new tab. This version also includes any selected text in the new message.

Here it is. Drag this bookmarklet -->Gmail This, to your bookmarks toolbar.

p.s. This was all tested on Firefox. I have no idea if it will work in IE, but it might with IE7.

No comments: