-
-
Save caligin/022e2996ab7691dc25ac 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() { | |
var size_amplification_factor = 1.1; | |
var possible = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
Array.prototype.slice.call(document.querySelectorAll('body *:not(iframe)')).reduce(function(m, n){ return m.concat(Array.prototype.slice.call(n.childNodes)); },[]).filter(function(n) { | |
return n.nodeType === Node.TEXT_NODE && n.parentElement.nodeName !== 'SCRIPT' && n.parentElement.nodeName !== 'STYLE' && n.nodeValue.trim() != ''; | |
}).forEach(function(n) { | |
var new_content = ''; | |
for(var i = 0; i< (n.nodeValue.trim().length * size_amplification_factor); i++) { | |
new_content += possible.charAt(Math.floor(Math.random() * possible.length)); | |
} | |
n.nodeValue = new_content; | |
}); | |
})(); |
Thanks, I'm working right now on making this a proper github repo instead of a gist so it's possible to PR and open issues, I'll include the URL-encoded version too!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not making this a formal fork, but here it is all on one line and URL-encoded for browsers that don't like spaces in bookmarklets: