GMail Ad Remover

By Ryan Hughes Last update Mar 1, 2007 — Installed 11,388 times. Daily Installs: 12, 14, 40, 178, 42, 18, 22, 31, 26, 25, 12, 26, 17, 20, 10, 11, 14, 11, 15, 8, 3, 7, 13, 7, 6, 8, 7, 6, 5, 6, 4, 9
// ==UserScript==
// @name           GMail Ad Remover
// @description    Removes ads, webclips, and "related pages" from GMail
// @version        1.2
// @author         Ryan Hughes
// @namespace      rjhughes@umich.edu:gmailadremover
// @include        http://mail.google.*/mail/*
// @include        https://mail.google.*/mail/*
// ==/UserScript==

function destroyAds(){
  var webclips = document.getElementById('fb');
  if (webclips) {
    webclips.parentNode.removeChild(webclips);
  } // if there's a webclip to destroy

  var sponsored = document.getElementById('ra');
  if (sponsored) {
    sponsored.parentNode.removeChild(sponsored);
  } // if there's sponsored things to destroy

  var related = document.getElementById('rp');
  if (related) {
    related.parentNode.removeChild(related);
  } // if there's "related pages"
} // function destroyWebClip

(function () {
  window.setInterval(destroyAds, 500);
}());