Reputation: 8697
On trying to debug an issue via FireBug in FF I landed up to a JS that runs hundred lines with no new lines, space and indentation. Though I know JS a little bit but reading this JS code was piratically impossible.
Math.random().toString().replace(/90\./,"");this.res=[];this.req=[];this.ret=null;this.retry=true;this.timeout=null;this.getDuration=function(precision){precision=!isNaN(precision)?(3-precision):0;};..........................and so on non-stop....
Is there a way in FireBug or via an online tool to make this JS code format into proper human readable format?
Upvotes: 0
Views: 210
Reputation: 598718
What you're seeing is obfuscated/minified JavaScript code.
This is done as a pre-production step to reduce download size of the script for web site visitors.
Your options to work with something more readable are (in order of ease of use):
Upvotes: 0
Reputation:
Try jsBeautifier. It's a pretty cool tool and is web based, so no download required.
You can also find a list of browser extension downloads if you wish.
Upvotes: 0