Skip to content

Instantly share code, notes, and snippets.

@stephskardal
Created August 13, 2015 20:35
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stephskardal/23112aa8e63252ac5be9 to your computer and use it in GitHub Desktop.
Save stephskardal/23112aa8e63252ac5be9 to your computer and use it in GitHub Desktop.
javascript:(function() {
var possible = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
$('*:not(iframe)').contents().filter(function() {
return this.nodeType == Node.TEXT_NODE && this.nodeValue.trim() != '';
}).each(function() {
var new_content = '';
for(var i = 0; i<this.nodeValue.trim().length; i++) {
new_content += possible.charAt(Math.floor(Math.random() * possible.length));
}
this.nodeValue = new_content;
});
})();
@caligin
Copy link

caligin commented Aug 17, 2015

Hi,
thanks for the bookmarklet, very handy. I forked with a quick modification to allow usage on sites without jQ (requires modern browser, i.e. document.querySelectorAll instead).
Available here if someone's interested: https://gist.github.com/caligin/022e2996ab7691dc25ac
Cheers!

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