Created
August 13, 2015 20:35
-
-
Save stephskardal/23112aa8e63252ac5be9 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 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; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!