Ventriloquist Bookmarklet


/ Published in: HTML
Save to your folder(s)

Find and Replace anything on (almost) any page.


Copy this code and paste it in your HTML
  1. javascript: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){nodes[n].textContent=nodes[n].textContent.replace(new RegExp(a,'gi'),b);}else{htmlreplace(a,b,nodes[n]);}}}htmlreplace(prompt("What do you want to replace?"),prompt("What do you want to replace it with?"))

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.