Skip to content

Instantly share code, notes, and snippets.

@doctorpangloss
Created November 28, 2014 03:51
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 doctorpangloss/37030a08b11b6ba9eeaa to your computer and use it in GitHub Desktop.
Save doctorpangloss/37030a08b11b6ba9eeaa to your computer and use it in GitHub Desktop.
productive evening
// Copy and paste into console, hit enter
var walker = document.createTreeWalker(
document.body,
NodeFilter.SHOW_TEXT,
null,
false
);
var node;
while(node = walker.nextNode()) {
node.nodeValue = node.nodeValue.replace(/ll[aeiou]?/g,'rru').replace(/ls\b/g,'rres').replace(/dle/g, 'derru').replace(/([aeiou])l+[aeiou]?/g,'$1r').replace(/([AEIOU]?)L+([AEIOU])?/g,'$1R$2').replace(/([aeiou]?)l+([aeiou])?/g,'$1r$2').replace(/([BPDKT])l/g, '$1r').replace(/ss+/g, 'sh');
}
'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment