The other day I had the need to scramble text on a page so I could capture a screenshot and send it to someone without them seeing the page content. I looked around for a Firefox Add-On that would do it for me but came up blank. So I wrote this quick:
javascript:function%20scramble(el){if(el.nodeType==3){el.nodeValue=el.nodeValue.replace(/[a-zA-Z]/g,function(x){return%20String.fromCharCode(((x.charCodeAt(0)<97)?65:97)+Math.floor(Math.random()*26));});}else{for(var%20i=0;i<el.childNodes.length;++i){scramble(el.childNodes[i]);}}};scramble(document.body);
Give it a try on this page to see how it works. Warning! You’ll have to reload, because you obviously won’t be able to read the text once this runs!
You can drag this link up to your Links toolbar or into a bookmark to make it easily available on any page.
Hey Matt,
I’ve been reading your blog for a little while now…I think I found it after reading some of your comments in the iGoogle Developer group…anyhow, this post motivated me to get out of Reader and come over and leave a comment. Why? Because bookmarklets are awesome…and this one is super. I’ve definitely needed this when taking screenshots.
I wrote my first bookmarklet the other day and thought you might find it useful when developing gadgets. It’s over at http://googlegadgetblog.com/features/expand-minimize-bookmarklet-igoogle-gadgets/
Keep up the good work!
This does not apply to this post, but i was wondering about a gadget you made for google a long time ago. Here is the link: http://www.javascripttoolbox.com/gadget/skin/
I can’t find it on iGoogle and was wondering if they took it down? I need a way to stop my ig page from refreshing. If you can help, I appreciate it, but I understand if there isn’t anything you can do. Thanks.
@igjoe : Unfortunately Google removed “inline” gadgets. My skin gadget was of this type, which was required to be able to manipulate the page and do things like stop the annoying refresh. So, unfortunately, that gadget is no longer available and there is no longer any way to create one that does the same thing.
Thanks for getting back to me so soon and I appreciate the help! Hopefully they will allow something in the future.