Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@StoneCypher
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save StoneCypher/38e80a0dafa33899fd1c to your computer and use it in GitHub Desktop.
Save StoneCypher/38e80a0dafa33899fd1c to your computer and use it in GitHub Desktop.
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;
})
});
})();
@asterick
Copy link

THAT WAS MINE! NOOOOOOOOOOOO

@StoneCypher
Copy link
Author

👍

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