http://jsbeautifier.org/
To illustrate what I mean, the following code is the content of Evernote's bookmarklet.
javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var%20x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new%20Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();
Running it through JS Beautifier results in
javascript: (function () {
EN_CLIP_HOST = 'http://www.evernote.com';
try {
var x = document.createElement('SCRIPT');
x.type = 'text/javascript';
x.src = EN_CLIP_HOST '/public/bookmarkClipper.js?' (new Date().getTime() / 100000);
document.getElementsByTagName('head')[0].appendChild(x);
} catch (e) {
location.href = EN_CLIP_HOST '/clip.action?url='
encodeURIComponent(location.href)'&title='
encodeURIComponent(document.title);
}
})();
Nice!
I tried it and it worked quite well. Thank you!
ReplyDeleteGreat tool. Helped me out. Thanks for posting!
ReplyDeleteBrilliant article. Exceptionally fascinating to peruse. I truly love to peruse such a pleasant article. Much appreciated! continue shaking.
ReplyDeletecss beautifier
I have been reading you blog for a few days, very good job! Aerospace webdesign
ReplyDelete