Skip to content

Instantly share code, notes, and snippets.

@asterick
Forked from StoneCypher/chicken.js
Last active Aug 29, 2015
Embed
What would you like to do?
(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("");
});
}
})("hodor");
@StoneCypher

This comment has been minimized.

Copy link

@StoneCypher StoneCypher commented Apr 30, 2014

@asterick

This comment has been minimized.

Copy link
Owner Author

@asterick asterick commented Apr 30, 2014

It's a fork, yo. I just made it so the word stuff is easier to change.

@StoneCypher

This comment has been minimized.

Copy link

@StoneCypher StoneCypher commented Apr 30, 2014

yeah but dat formatting doe

also you're re upper casing it for every letter

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