Created
November 12, 2016 15:21
-
-
Save bnjm/a69c78cdc45265e18e4fe2da3fea4939 to your computer and use it in GitHub Desktop.
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
(function(e){ | |
var n | |
var a = [] | |
var walk = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, null, false) | |
while (n = walk.nextNode()){ | |
a.push(n) | |
return a | |
} | |
})(document.body).forEach(x => { | |
x.textContent = x | |
.textContent | |
.replace(/donald|trump/gi,'💩') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment