Last active
May 11, 2018 14:59
-
-
Save davidgarsan/92f5fcefcf290d4674e5beb9ae7e0990 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
javascript:(function() { | |
function textNodesUnder(el){ var n, a=[], walk=document.createTreeWalker(el,NodeFilter.SHOW_TEXT,null,false); while(n=walk.nextNode()) a.push(n); return a; } | |
Array.prototype.forEach.call(textNodesUnder(document.body), function(elem){ | |
const t = elem.textContent.trim(); | |
if(t) { | |
fetch("https://ninini-cvyphndqrn.now.sh/ninini/"+t) | |
.then(resp => resp.text()) | |
.then(text => elem.textContent = text) } }); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment