Created
August 19, 2016 19:04
-
-
Save doctorpangloss/7f19a6a05a69a93a20bab049a8f70f18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function textNodesUnder(el){ | |
var n, a=[], walk=document.createTreeWalker(el,NodeFilter.SHOW_TEXT,null,false); | |
while(n=walk.nextNode()) a.push(n); | |
return a; | |
} | |
textNodesUnder(document.body).forEach(function(a) {a.textContent = a.textContent.replace(/data/g,'tuna').replace(/Data/g, 'Tuna');}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment