Last active
August 29, 2015 14:00
-
-
Save StoneCypher/38e80a0dafa33899fd1c to your computer and use it in GitHub Desktop.
I STOLED THIS CODE lul
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
/* code blatantly stolen from @asterick */ | |
(function chicken() { | |
function textNodesUnder(el, transform){ | |
var n, a = [], walk = document.createTreeWalker(el,NodeFilter.SHOW_TEXT,null,false); | |
while (n=walk.nextNode()) { transform(n); } | |
} | |
textNodesUnder(document.body, function (el) { | |
el.nodeValue = el.nodeValue.replace(/\w+/g, function (o) { | |
var out = ""; | |
for (var i = 0; i < 7; i++) { out += ((o[i] == (o[i] || "").toUpperCase()) ? "CHICKEN" : "chicken")[i]; } | |
return out; | |
}) | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍