Try other web apps in Thunderbird tabs

Colin Dean converted the code from my post on Google Calendar in Thunderbird tabs and created a GMail tab for Thunderbird.

If you’re interested in trying what a web application would look like running inside a Thunderbird tab without modifying an extension use the following code snippet.

Open the Error Console from the Tools Menu

tools-error-console

Copy & Paste this code into the input entry at the top:

Components.classes['@mozilla.org/appshell/window-mediator;1']
          .getService(Components.interfaces.nsIWindowMediator)
          .getMostRecentWindow("mail:3pane")
          .document.getElementById("tabmail")
          .openTab("contentTab",{contentPage:"http://tinyvid.tv/show/2h9led44g152z"})

update: here’s a text input which you can easily copy and paste the above code from.

Change the provided link ( http://tinyvid.tv/show/2h9led44g152z ) at the end to the web application you’d like to try, like http://twitter.com for example.  Click the ( Evaluate ) button.

error-console

It’s Party Time! ( if you didn’t change the link,  http://tinyvid.tv/show/2h9led44g152z )

its-party-time-in-a-thunderbird-tab

You can continue to iterate the tab application by creating a new click handler, however at that point it might be worthwhile to start with the extension code instead of working in the error console.

Jetpack for Thunderbird

In the hopefully not too distant future Thunderbird will gain Jetpack as it’s new extension model and it will be no longer necessary for add-ons like this these be created but instead a simple Jetpack which can do the same things without restarts or complicated installs.

If you’re interested in this take a look at Andrew’s recent Jetpack in Thunderbird post.

Above code snippet courtesy of Magnus in

12 responses to “Try other web apps in Thunderbird tabs

  1. John Doe

    I want to use Thunderbird as a browser, is there any way I can close the main email tab?

    Thanks,
    Your John

  2. John Doe

    Seriously, that would be interesting for _only_ opening a raindrop instance, but using TB for sending.

  3. pt

    what is that gnome theme you are using?

  4. Nice try, unfortunately for Gmail tab and Google Calendar the Thunderbird extension called Thunderbrowse that does a lot more. It essentially transforms Thunderbird into a web-browser with tabbed browsing – that means with one add-on you can get into your Google account and use Gmail, Google Calender, Wave etc and navigate the web.

  5. Shariq

    I’d love to be able to have the Activity Manager open in a tab instead of a window. What’s the location (something similar to about:config?)?

  6. stylo~

    I get an error. (Also gmail tab wouldn’t even install, but yours did.) XP 3.0 final.

    Error: syntax error
    Source File: javascript:%20Components.classes['@mozilla.org/appshell/window-mediator;1'],%20%20%20%20%20%20%20%20%20%20.getService(Components.interfaces.nsIWindowMediator),%20%20%20%20%20%20%20%20%20%20.getMostRecentWindow(“mail:3pane”),%20%20%20%20%20%20%20%20%20%20.document.getElementById(“tabmail”),%20%20%20%20%20%20%20%20%20%20.openTab(“contentTab”,{contentPage:”http://cnn.com”})
    Line: 1, Column: 73
    Source Code:
    Components.classes['@mozilla.org/appshell/window-mediator;1'], .getService(Components.interfaces.nsIWindowMediator), .getMostRecentWindow(“mail:3pane”), .document.getElementById(“tabmail”), .openTab(“contentTab”,{conte

  7. Shariq

    stylo, make sure you remove the commas tb adds in place of carriage returns after you paste the code.

  8. dick

    I’ve tried your hint in the error console above, and get the following error:

    Error: syntax error
    Source File: javascript:%20Components.classes['@mozilla.org/appshell/window-mediator;1'],%20%20%20%20%20%20%20%20%20%20.getService(Components.interfaces.nsIWindowMediator),%20%20%20%20%20%20%20%20%20%20.getMostRecentWindow(“mail:3pane”),%20%20%20%20%20%20%20%20%20%20.document.getElementById(“tabmail”),%20%20%20%20%20%20%20%20%20%20.openTab(“contentTab”,{contentPage:”http://www.google.com/calendar/renderOnline”})
    Line: 1, Column: 73
    Source Code:
    Components.classes['@mozilla.org/appshell/window-mediator;1'], .getService(Components.interfaces.nsIWindowMediator), .getMostRecentWindow(“mail:3pane”), .document.getElementById(“tabmail”), .openTab(“contentTab”,{conte

    I really would like to have the google calendar linked to my thunderbird, so i can STOP using Outlook; I’m not a programmer, but the error message showed an arrow pointing to the dot prior to “get” above; is it all the spaces that should not be there…I simply copied/pasted as the instructions indicated – I’m not a programmer. Thanks

  9. Shariq

    Dick, when you simply copy and paste, TB adds a bunch of commas after every line. What you need to do is take the above code, copy and paste it into a plain text editor (i.e. notepad) and put everything on one line.

    Components.classes['@mozilla.org/appshell/window-mediator;1'] .getService(Components.interfaces.nsIWindowMediator) .getMostRecentWindow(“mail:3pane”) .document.getElementById(“tabmail”) .openTab(“contentTab”,{contentPage:”http://www.google.com/calendar/renderOnline”})

    Try this! :)

  10. I added an input entry to the post now (just below the code sample) with the code all on a single line so you can just copy and paste that without getting issues of the wrong quotes or added commas that happen. Let me know if it doesn’t work!

  11. Garett

    Awesome, just wish we could sign into different google accounts for the calendar tab and gmail tab. And then, multiple calendar and gmail account tabs would be cool too. Not sure if that’s possible – don’t know a thing about coding.

  12. Pingback: Try other web apps in Thunderbird tabsBryan Clark | 9nd.pl

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

aboot

This is the blog personality of Bryan Clark. I'm a designer in a world of open source. This blog reflects mostly writing about Design, Open Source, Economics, Beer, Wine, and Dogs. There's more information about me on this site or you can contact me directly at clarkbw@gmail.com.

scategories