Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Gmail Addons

Addon any functionality to the gmail interface. The script comes with Calendar and Chat. (This script replaces 'Enhance Gmail')

Latest Version

3.6 : (21 Apr, 2008) Miscellaneous changes to speed things up.

Please refer to the source code for the changelog

Feature List

Complete integration with Google Calendar and Google Chat (a nicer flash based interface). You can also any other addon quite easily. This script works with the new version of Gmail.

Calendar Integration

For better calendar integration please check out my other script Enhance Google Calendar - it cleans up Google Calendar and makes it more suitable for the gmail view.

Compatible Gmail Addons

Setting Options

Click on the 'Prefs' link on the top or go to 'User Script Commands' -> '! Gmail Addons Preferences'. Please check out the source of this script to set whether the top bar scrolls with the page or not.

Feature Requests

This script has been tested with the default gmail and calendar pages. In the event that you have other extensions/scripts installed that cause something weird to happen, please let me know and i will look into it.

Also, if you have any ideas about how to make this script better, let me know and i will see if i can implement it

Other Scripts for Gmail

Gmail Beautifier, Enhance Google Calendar, Gmail Macros (new), Folders4Gmail

Developer information

Its very easy to add any custom addon to the gmail interface once this script is installed. You may create a new user script and put one line of code in it to add anything you want.

Note that some pages (example Google Docs) will check to see whether it is being loaded as part of another page (in a frame) and will redirect if so. This example cannot be used in such cases.

Here's how it works: An object called GmailAddons handles all the dirty work. You merely pass an object to the registerAddon function with the relavent parameters and it will be installed. For instance,

GmailAddons.registerAddon(
{
  id: 'tdGCal',               // id of the addon. must be present. 
                              // this is used to store the users custom preferences
                              // though this can be anything you like, a nice template would be
                              // [username][scriptname]
  name: 'Google Calendar',    // name of addon used in the toggle messages
  url: 'https://www.google.com/calendar',
                              // url of page to load
  indicatorLabel: 'Calendar', // the name of the link displayed in the top bar
                              // if the name already exists that link will be replaced
                              // otherwise a new link will be created (optional)
  position: 'bottom',         // one of 'left','right','bottom' (optional: defaults to 'bottom')
  width: 20,                  // width in percentage. only used if position is 'left' or 'right'
                              // (optional: defaults to 15)
  height: 60,                 // height in percentage (if the frame is outside the main frame)
                              // height in pixels (if frame is inside the main frame)
                              // only used if position is 'bottom'
                              // (optional: defaults to 60)
  openOnLoad: true,           // whether the addon opens up when gmail loads (optional: defaults to false)
  callback: function(){alert('hi');},
                              // this function will be called when gmail is fully loaded 
                              // and the addon fully integrated (optional)
  insideMainFrame: false      // whether the addon will be displayed inside the main gmail frame
                              // only used if the position is 'bottom'
                              // (optional: defaults to false)
});

Known Issues

The script (like any other that uses the Gmail API) does not work correctly with ff3b5.




May 5, 2008
max6166 User

@searchforsunrise: Thanks. As you explained, changing "const COLLAPSED_MAIL_HEIGHT" eliminated the extra blue space at the bottom of the mail area.

I just found out the 40px high GCal area was my fault for not reading the instructions carefully. The height value in the preferences area is only a percentage when the calendar is outside the main frame, and other wise it is the height in pixels.

Increasing the value to 400 fixed everything up, and it wokrs great now.

A minor cosmetic thing I noticed. I get a vertical scrollbar for the GCal area that only moves the content a few pixels (less than 5).

I think the iframe is winding up just a few pixels shorter than the calendar content.

Just noting it in case anyone is interested. This script is now working great for me as is. I basically have gOutlook killer now! :)


 
May 5, 2008
searchforsun... User

@max - thought i'd chime in here with some help...

the gmail inbox is controlled by the script value called "const COLLAPSED_MAIL_HEIGHT". The default value is "400" (in pixels) - that's why the bottom of your inbox looked stretched. You may want to set it to a much lower value.


 
May 2, 2008
max6166 User

I later tried disabling the RTM extension and the problem still remained.

As far as I can tell, there was nothing else running that was related to gmail.


 
May 2, 2008
max6166 User

This script is fantastic!

I would much prefer to display my GCalendar Inside the Main Frame, but when I set that option to true, the display goes buggy.

Specifically, the bottom blue bar of the gmail area is stretched down significantly, and the Calendar area is only about 25 pixels high (It is set to 60px +).

I use the Remember the Milk addon, though I don't know if that is related.


 
Apr 29, 2008
The Dot Script's author

@flakess:
The gmail API is the same, whatever browser you view it from. This means that if, as you suggested, the API has in some way changed to make the tutorial outdated, scripts should consistenly break accross all browsers.
This leads me to believe that that the GmailAPI is incompatible with firefox 3 beta 5. I hope this clarifies what i think about the issue. If you have any other take on the issue, please continue to leave your comment - id love to discuss this further. Thanks.


 
Apr 28, 2008
Flakess User

I guess it's because the tutorial given is outdated and the script need to be adapted for it, new API.


 
Apr 27, 2008
The Dot Script's author

hi flakess
thanks for reporting this. i notice that you had reported this issue once before. to reiterate my reply, any script that uses the gmailAPI will not work with ff3b5. you an verify this by installing this script: http://code.google.com/p/gmail-greasemonkey/wik... which happens to be provided by Google. The same problem occours. This will have to be fixed by Google for any script that uses the GmailAPI to work correctly.


 
Apr 27, 2008
The Dot Script's author

hi flakess
thanks for reporting this. i notice that you had reported this issue once before. to reiterate my reply, any script that uses the gmailAPI will not work with ff3b5. you an verify this by installing this script: http://code.google.com/p/gmail-greasemonkey/wik... which happens to be provided by Google. The same problem occours. This will have to be fixed by Google for any script that uses the GmailAPI to work correctly.


 
Apr 25, 2008
Flakess User

I use Firefox 3 Beta 5, Greasemonkey 0.7.20080121.0, and the latest version of the script, it wont help at all.


 
Apr 23, 2008
The Dot Script's author

@Shaun Raymond: Ive updated the description of that script to be more comprehensive. I hope that helps you.
If you would like more help please leave a comment or contact me at exstodot@gmail.com

@nka: This seems to be something of a one-time issue with the Google Gadget. As you can see, all that is Google's code mess ;). If this issue does not occour repeatedly when you refresh the page, I suggest that you dont worry about it. If it does, please let me know. Thanks.

@all: Please leave your comments at their respective scripts. I assure you, I do check the comments of all of them. The discussion might be of use to other users of the scripts. Thank you.


 
Apr 22, 2008
nka User

This is a comment on Gmail Addons + Google Docs

Weirdest thing, first the addon was working, and all of a sudden this pops up in the sidebar when the Documents button is clicked:

/* Copyright 2007 and beyond, Google Inc. To use gadgets on your own site, visit http://www.google.com/webmasters/gadgets. To create your own gadgets, visit http://www.google.com/apis/gadgets */(function(){var c=document.bgColor;var r,g,b;if(c.length!=7){r=g=b=1;}else{c=c.substring(1,c.length);r=parseInt(c.substring(0,2),16)/255;g=parseInt(c.substring(2,4),16)/255;b=parseInt(c.substring(4,6),16)/255;}var bgcolor=((r+g+b)/3<0><>\"]/.test(c)?c.replace(/&/g,"&").replace(//g,">").replace(/\"/g,"""):c};j.prototype.b=function(c){var a="<iframe>"};j.prototype.k=function(c,a){try{return c.frames[a]}catch(b){return null}};j.prototype.e=function(c){var a=document.createElement("iframe");for(var b in c)a.setAttribute(b,
c[b]);return a};j.prototype.h=function(c,a){var b=this;setTimeout(function(){document.body.appendChild(b.e({id:c,name:c,src:a,width:0,height:0,frameBorder:0}))},0)};j.prototype.p=function(c,a){var b=this;document.write(b.b({id:c,name:c,src:a,width:0,height:0,frameBorder:0}))};j.prototype.g=function(c,a){var b=[],f=c.length,d=0;while(d<f><f><3>
window[c]=new a;for(var d=0;d<s>
"_"+(h+k),i+"#"+o[k]);e.c[a]+=s}};g.prototype.n=function(a,b,f){var d=this;d.o(a);d.m[a]=window.setInterval(function(){d.u(a,b)},typeof f=="object"&&f.pollingInterval||IDICommon.IDI_DEFAULT_POLLING_INTERVAL)};g.prototype.o=function(a){var b=this;window.clearInterval(b.m[a]);b.m[a]=0};g.prototype.w=function(a){this.r=a};g.prototype.z=function(a){this.s=a};g.prototype.d=function(a){return this.s||a.replace(/([^:\/]\/).*$/,"$1ig/idi_relay")};g.prototype.u=function(a,b){var f=this,d=window.frames[a];
if(d){var e;while(e=IDICommon.k(d,a+"_"+f.i[a])){try{if(e.location.href=="about:blank")break}catch(h){break}f.f[a]+=IDICommon.j(e.location.href);++f.i[a]}var i=f.f[a].split("$"),m=i.length-1;if(m>0){f.f[a]=i[m];for(var n=0;n<m>
width:f,height:d});h.i[b]=0;h.c[b]=0;h.f[b]="";h.t[b]=a;var t=[];if(typeof o=="object")for(var p in o)t.push(encodeURIComponent(p)+"="+encodeURIComponent(o[p]));if(typeof n=="function"){t.push("idi_hr="+encodeURIComponent(h.r));h.n(b,n,e)}if(t.length){var q=t.join("&");if(i.src.length+1+q.length>IDICommon.MAX_URL_LENGTH){q+="$";var v=h.d(a),z=IDICommon.MAX_URL_LENGTH-1-v.length,w=IDICommon.g(q,z),x=w.length;for(var p=0;p<x>
r.innerHTML+h.e({id:u,name:u,src:y,width:0,height:0,frameBorder:0})}else IDICommon.p(u,y)}h.c[b]+=x;q=""}i.src+="#"+q}if(k){var r=document.getElementById(k);r.innerHTML=r.innerHTML+IDICommon.b(i)}else document.write(IDICommon.b(i))};var l=g.prototype,c=[["setHostRelayUrl",l.w],["setModuleRelayUrl",l.z],["getModuleRelayUrl",l.d],["createModule",l.q],["postMessageToModule",l.v],["registerListener",l.n],["unregisterListener",l.o]];IDICommon.a("IDIHost",g,c)})();
function _idi_decodeArgs(d){var a=d.split("&");for(var b=0;bhttp://www.google.com/ig/modules/docs.xml\x26up...=" + encodeURIComponent(location.href);var hostRelayUrlPath = _idi_getup(iframe_url, "req_idi_hr");if (hostRelayUrlPath != null) {var hostRelayUrl = window.location.protocol + "//" +window.location.host + hostRelayUrlPath;IDIHost.setHostRelayUrl(hostRelayUrl);}IDIHost.createModule(iframe_url, 'iframe_2143218596','320', '500',{callback: _idi_callback,userPrefs: { },pollingInterval: 100,parentDivId: 'idi_2143218596'});})();</x></m></s></f></f></iframe>


 
Apr 21, 2008
Shaun Raymond User

This is a comment on the add to bcc fields...

This script is awesome but I can't get it to work.
I would love to talk with you sometime if you get a chance.

My phone number is 818-919-9089 I'm willing to pay for knowledge


 
Apr 21, 2008
The Dot Script's author

@nka: The code you've written is absolutely perfect. The problem here is that Google Docs checks to see whether its being loaded as part of another page. If so, it redirects the browser.
As an alternative, I would suggest 'Google Docs + Gmail Addons'. Though it has relatively limited functionality, it uses a Google Gadget that is being continuously improved by Google. Please do tell me if you find it satisfactory.

@all: The latest version - Gmail Addons 3.6 is out. Please update the script by clicking on the 'Install this Script' button on the top right.


 
Apr 21, 2008
nka User

Thanks for the great script. I'm trying to add Google Docs as an addon, and it works, except for the fact that it auto loads to Google Docs, as soon as I load the Gmail inbox. Why is it doing this? I copied the script for Google Calendar and modified it a bit to open Google Docs. here is what I have inserted:

});
GmailAddons.registerAddon(
{
id: 'tdGDocs',
name: 'Google Documents',
url: 'https://docs.google.com/?tab=mo#not-in-folders',
indicatorLabel: 'Documents'
});

What have I done wrong, and is there a way to ad Google Docs as an addon? Thanks!


 
Apr 14, 2008
The Dot Script's author

@sk: i just whipped something up at http://userscripts.org/scripts/show/25195 . i hope it helps you

@flakess: thank you for reporting this issue. this issue seems to be the gmail api being incompatible with firefox 3 beta 5. you may verify this by installing the script at http://code.google.com/p/gmail-greasemonkey/wik... . the same issue occours with that script as well. this means that google/firefox will have to fix their code ;) for any gmail script using that api to work correctly on firefox 3 beta 5.


 
Apr 13, 2008
Flakess User

Hello,

please explain me why do I have to clear all private data to make the script working again when the next time I restart Firefox. That's damn weird. I use Firefox 3 beta 5 and latest versions of both greasemonkey and Gmail Addons.


 
Apr 1, 2008
sk User

Thanks a lot. I am looking for a solution to make BCC compulsory to a preselected other mail a/c. Can you support me?


 
Mar 28, 2008
The Dot Script's author

@ tbw, rkmase : thanks for reporting the problem. i verified the issue on firefox3beta4. the problem occours less frequently on firefox3 than on firefox2 but it does still occour especially when you switch between multiple views repeatedly. consequently, i have updated the script and uploaded the changed version. i think this solves the problem.. i havent updated the script changelog as im not perfectly sure of the issue being solved. please do download it again and check it out. please report anything that goes wrong.

@ rkmase : thank you for reporting that. that behaviour was actually correct for the script. on the latest update, you should see the word appearing 3 times (or more if you have more addons installed) on loading gmail, and an additional 1 time for every view change. (you might have more instances of the word poll if you have a slow connection)

@ blake johnson : i have verified that the script does work with the latest version of the rtm extension. please download the latest version of both this script and the rtm extension.

Are there no plans to ever make this script work with it?

You are probably referring to the issues as posted on the rtm forums or in these comments. the issue has already been corrected.

@ all : im really pressed for time as my exams are going on right now (they will continue until the end of april). consequently, i cannot check these comments as frequently as i wish to. please do keep reporting any issues and ideas that you may have. i will definitely look through them when i have any spare time. please make sure you have the latest version installed before reporting a problem. thank you.


 
Mar 27, 2008
blake johnson User

I love this script but can't live without Remember the milk. Are there no plans to ever make this script work with it?


 
Mar 24, 2008
rkmase User

@the dot

sorry for the delay - disabling Gmail Addons for the weekend provided relief from the slowdown/script stop. So (at least on my instances) the script is causing the error.

this may be of use though - your suggestion:
"another thing that might help is if you reported the number of times the word 'poll' turns up in the error console."

On load, with the script enabled, I saw 3 instances of the poll in the error console, with an ADDITIONAL 3 instances everytime I changed folders within gmail. According to your post, this seems high. Any ideas?

Thanks again.


 
Mar 19, 2008
tbw User

I have found that it does function with FFb3r4 using apps, however after 20 minutes or so, it starts slowing down and then throwing the stuck script errors. The only solution is to restart FF, but it inevitably happens again. If I disable Gmail Addons in Greasemonkey, everything behaves fine, so I believe it is Addons that is the issue. I love the script, I hope that you can get it working -- thanks.


 
Mar 14, 2008
The Dot Script's author

@ jim murphy : thanks a lot for your information. i have verified the same and now i dont worry about what to do ;) . the js performance of firefox has generally been quite bad. firfox 3 looks good that way :).

@ jonesclp : are the other links displayed or is it only with the prefs link that you have a problem?
as for the user script commands, it seems to be an issue with the latest version of greasemonkey which changes a few things for security reasons. i will work on finding a workaround. please make sure you have the latest version installed (ver 3.5 as of this post)


 
Mar 13, 2008
jonesclp User

I am using google apps for gmail. I can see the script is active when in my regular gmail but when i view my gmail for apps it does not display the Pref links and i cannot access user script commands. Any ideas why? I really like the script but need it most in my google apps mail.

thanks


 
Mar 12, 2008
jim murphy User

Just wanted to say that I am also experiencing the script stuck error message when I go to Gmail in Firefox. It does not matter if you even have Greasemonkey installed or not it seems to be something wrong between Gmail and Firefox. I used a completely new install and immediately ran into problems on my version of Firefox I had turned off all scripts and eventually turned off GM as well and while it slowed this from happening so much it did not eliminate it.

Jim Murphy


 
Mar 10, 2008
enmi User

The Dot,

Wondering if you'd be open to a freelance project regarding Firefox add-on for web email applications. If so, please contact me at:
enmisung [at] gmail.com


You could comment on this script if you were logged in.