Skip to content

Instantly share code, notes, and snippets.

@xezno
Created February 12, 2019 13:12
Show Gist options
  • Save xezno/ba8dacbc0a0b8d1788ea24273605ffcf to your computer and use it in GitHub Desktop.
Save xezno/ba8dacbc0a0b8d1788ea24273605ffcf to your computer and use it in GitHub Desktop.
The UwU Button
function getUwuString(a){return a.replace(/[.]/g,"!!!").replace(/th|Th/g,"f").replace(/W/g,"w-w").replace(/l|L|r|R/g,"w").toLowerCase()}function uwuify(a){var b=["^~^","UwU","OwO","O_O","O_o","oWo","OvO","UvU","*~*",":3","=3","<(^V^<)"];if(null==a)var a=document.body;a.childNodes.forEach(function(a){if(!(3===a.nodeType))uwuify(a);else if(""!==a.nodeValue.trim()){var c=a.nodeValue;c=getUwuString(c),0==Math.floor(2*Math.random())&&(c+=" "+b[Math.floor(Math.random()*b.length)]),a.nodeValue=c}})}uwuify();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment