Created
March 13, 2010 03:39
-
-
Save erikvold/331085 to your computer and use it in GitHub Desktop.
This userscript removes ads from the Wall Street Journal, if it misses any let me know.
This file contains 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 Wall Street Journal Ad Remover | |
// @namespace wsjAdRemover | |
// @include http://*.wsj.com/* | |
// @include http://wsj.com/* | |
// @include https://*.wsj.com/* | |
// @include https://wsj.com/* | |
// @match http://*.wsj.com/* | |
// @match http://wsj.com/* | |
// @match https://*.wsj.com/* | |
// @match https://wsj.com/* | |
// @datecreated 2010-03-12 | |
// @lastupdated 2010-03-12 | |
// @version 0.1 | |
// @author Erik Vergobbi Vold | |
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html | |
// @description This userscript removes ads from the Wall Street Journal, if it misses any let me know. | |
// ==/UserScript== | |
(function(d){ | |
var adRemoverFunc = function(){ | |
var classNameAry = ['advertisement', 'adSummary', 'specialAdvertising', 'emailSignUp', 'ad_artBottomCircMarketing'], | |
tempEle, tempEles; | |
// remove known ad class names | |
for (var i = 0; i < classNameAry.length; i++) { | |
tempEles = d.getElementsByClassName(classNameAry[i]); | |
for (var j = 0; j < tempEles.length; j++) { | |
tempEles[j].parentNode.removeChild(tempEles[j]); | |
} | |
} | |
} | |
window.addEventListener( "load", adRemoverFunc, false ); | |
adRemoverFunc(); | |
setTimeout( adRemoverFunc, 2000 ); | |
})(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment