Skip to content

Instantly share code, notes, and snippets.

@feiz
Last active August 29, 2015 14:20
Show Gist options
  • Save feiz/894bf01d1523ea2ca634 to your computer and use it in GitHub Desktop.
Save feiz/894bf01d1523ea2ca634 to your computer and use it in GitHub Desktop.
かよちんjs
void(!function(d){function x(nodes){for(var i in nodes){var n=nodes[i];if(n.nodeType==3){var nt="";for(var i in n.wholeText){if(!/[\s\nがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポ]/.test(n.wholeText[i])){nt+=n.wholeText[i]+"\u3099";}else{nt+=n.wholeText[i]}}n.textContent=nt}else{x(n.childNodes)}}}x(d.body.childNodes)}(document));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment