Skip to content

Instantly share code, notes, and snippets.

@minitech
Created August 11, 2012 16:59
Show Gist options
  • Save minitech/3325725 to your computer and use it in GitHub Desktop.
Save minitech/3325725 to your computer and use it in GitHub Desktop.
Catify
// Translates web pages to cat
!function(d,p,i,j,c,n){for(p=d.querySelectorAll('p'),i=p.length;j--&&(n=c[j])||i--&&(c=p[i].childNodes,n=c[j=c.length-1]);)if(n.nodeType==3)p[i].replaceChild(d.createTextNode(n.nodeValue.replace(/([a-z])[a-z]*/gi,function(p,i){return/[a-z]/.test(i)?'meow':'Meow'})),n);}(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment