-
-
Save asterick/a0799b0eaa1b65fc13a5 to your computer and use it in GitHub Desktop.
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
(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"); |
It's a fork, yo. I just made it so the word stuff is easier to change.
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
internet claims i did it first
https://gist.github.com/StoneCypher/38e80a0dafa33899fd1c