Answers for "replace all swear words using bookmarklet"

0

replace all swear words using bookmarklet

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('old','new');
Posted by: Guest on February-24-2021

Code answers related to "replace all swear words using bookmarklet"

Code answers related to "Javascript"

Browse Popular Code Answers by Language