12

For when I need to make a website awesome:

javascript:var a='hotPink',b='pink',h=document,i=h.body,c=function(d,e){f=h.getElementsByTagName('*');for(g in f){f[g].style.background=d;f[g].style.color=e;}};i.innerHTML='<marquee behavior="scroll" direction="left" scrollamount="30">'+i.innerHTML+'</marquee>';(function(){function htmlreplace(a,b,element){if(!element)element=document.body;var nodes=element.childNodes;for(var n=0;n<nodes.length;n++){if(nodes[n].nodeType==Node.TEXT_NODE){var r=new RegExp(a,'g');nodes[n].textContent=nodes[n].textContent.replace(r,b);}else{htmlreplace(a,b,nodes[n]);}}}htmlreplace("a|e|i|o|u",'o');htmlreplace("A|E|I|O|U",'O');})();c(a,b);

Comments
  • 0
    what exactly does this code do
  • 2
    @code-freak Put it in the console and you'll see.
  • 0
    could be nicer if you had used all alphabet for variables but well done, it was hard to beautify in my head just by reading it 😂
  • 1
    @ivannieto it's an amalgamation of a few bookmarklets and my own custom code. Only minified it enough to fit in a Chrome bookmark.
Add Comment