Skip to content

Instantly share code, notes, and snippets.

@digitalicarus
Created November 4, 2013 17:13
Show Gist options
  • Save digitalicarus/7305948 to your computer and use it in GitHub Desktop.
Save digitalicarus/7305948 to your computer and use it in GitHub Desktop.
Bookmarklet: replace text in page
(function(){var t=function(r){var n,a=[],w=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false);while(n=w.nextNode()) a.push(n);return a;},i,n=t(document.body); for(i=0;i<n.length;i++) n[i].nodeValue=n[i].nodeValue.replace(/fuck/ig,'Praise');})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment