Charlie Harvey

Gmail de-ad greasemonkey script

NOTE Google changed the gmail API some time ago. I haven't been able to suss out how and they haven't documented it. So I’m no longer able to support this project. My apologies.

This Greasemonkey script hides the right hand side ads on gmail and widens the email bit. You'll need to install Greasemonkey as a firefox extension, restart firefox, then install gmail de-ad from userscripts. org.

Update: You can now set the body width and ui version in the userscripts command menu. Changing values reloads Gmail.

Update: More improvements. Google actually have a greasemonkey API. Which made things quite a lot easier. No more annoying clicking to hide ads.

Update: Google have updated their user interface (ui). I’ve made a new version of gmail de-ad. The new version adds a de-ad button to your gbar (googlespeak for the menu at the top left of the screen). When you open an email click the link to hide the ads and widen your message area.


Screen shot of gmail before ad removal

Screen shot of gmail before ad removal


Its in the source. But here's a cut 'n' paste!


To install, you need Greasemonkey: Then restart Firefox and revisit this script. Under Tools, there will be a new menu item to "Install User Script". Accept the default configuration and install.

To uninstall, go to Tools/Manage User Scripts, select "De-ad gmail", and click Uninstall.

There are some variables that you can tweak. Under usecript commands, you can set "gmail de-ad ui version" and "gmail de-ad body width".

User script commands

  • gmail de-ad ui version sets the ui version to 1 or 2(default). You can use the old ui(1) using the "older version" link at the top right of the screen. You'll know you're using it cos the url will end ?ui=1. Default: 2.
  • gnmail de-ad body width.Use this to set your preferred message area width. I have a nice big monitor. Default: '1100px'


If you browse emails using the older and newer links, you'll find that gmail de-ad will forget the body width. That's an issue that I’ll try and fix, but don't get your hopes up.


  • Be respectful. You may want to read the comment guidelines before posting.
  • You can use Markdown syntax to format your comments. You can only use level 5 and 6 headings.
  • You can add class="your language" to code blocks to help highlight.js highlight them correctly.

Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don’t log these details. Those services will. I do log everything you type into the form. Full privacy statement.