Skip to content

Instantly share code, notes, and snippets.

View asterick's full-sized avatar

Bryon Vandiver asterick

View GitHub Profile
@asterick
asterick / chicken.js
Last active August 29, 2015 14:00 — forked from StoneCypher/chicken.js
(function(word) {
var walk=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,null,false), el;
word=word.split("");
while(el=walk.nextNode()) {
el.nodeValue = el.nodeValue.replace(/\w+/g, function (o) {
return word.map(function (v, i) {
return (o[i] < "a") ? v.toUpperCase() : v;
}).join("");
});
}