Skip to content

Instantly share code, notes, and snippets.

@vrutberg
Created June 9, 2009 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrutberg/126415 to your computer and use it in GitHub Desktop.
Save vrutberg/126415 to your computer and use it in GitHub Desktop.
function() {
function piratify(str) {
return str.replace(/pp/gi, "(pp)");
}
var tags = ['p','li','h1','h2','h3','h4','h5','h6','td','th'];
var texts = [];
for(var i = 0; i < tags.length; i++) {
texts = document.getElementsByTagName(tags[i]);
for(var j = 0; j < texts.length; j++) {
texts[j].innerHTML = piratify(texts[j].innerHTML);
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment