Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
I STOLED THIS CODE lul
/* 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;
})
});
})();
@StoneCypher
Copy link
Author

StoneCypher commented Apr 30, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment