Created
November 28, 2014 03:51
-
-
Save doctorpangloss/37030a08b11b6ba9eeaa to your computer and use it in GitHub Desktop.
productive evening
This file contains hidden or 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
// 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