Skip to content

Instantly share code, notes, and snippets.

@caligin
Forked from stephskardal/jibberish
Last active July 24, 2019 18:58
Show Gist options
  • Save caligin/022e2996ab7691dc25ac to your computer and use it in GitHub Desktop.
Save caligin/022e2996ab7691dc25ac to your computer and use it in GitHub Desktop.
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;
});
})();
@caligin
Copy link
Author

caligin commented Aug 18, 2015

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!

@caligin
Copy link
Author

caligin commented Aug 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment