Created
January 11, 2014 19:52
-
-
Save wturnerharris/8375866 to your computer and use it in GitHub Desktop.
Remove ad column from DOM in gmail and kill the remaining margin-right css property.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Hide Gmail Ads | |
| // @namespace http://userscripts.org/users/540155 | |
| // @description Remove ad column from DOM in gmail and kill the remaining margin-right css property. | |
| // @match https://mail.google.com/ | |
| // @include https://mail.google.com/* | |
| // @include https://mail.google.com | |
| // @grant GM_addStyle | |
| // @version 0.1 | |
| // @copyright 2014+, You | |
| // ==/UserScript== | |
| function removeAds() { | |
| var y3 = document.getElementsByClassName('y3'); | |
| if (y3.length) { | |
| y3[0].remove(); | |
| console.log('removed ad panel'); | |
| } | |
| } | |
| window.onhashchange = removeAds; | |
| window.setTimeout( removeAds, 5000 ); | |
| GM_addStyle('.if{margin-right: 0px !important;}'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment