There are many compacted javascript source code in web and I am wonder how to transfer it to the normal code and make it readable? Are there any exsited tools or scripts?
+1
A:
You can try http://jsbeautifier.org/
But you will never get it really readable, because all comments and names will be screwed. You can get non-minified version for almost any free javascript file.
Māris Kiseļovs
2010-07-20 06:42:48
The website can reformat compress code quickly and there are normal format javascript code for almost open-source project. Thanks
hyperion
2010-07-21 06:09:31
A:
If it's a free library, you will most likely find the uncompressed version for download on the official website - this is the best choice when available. Otherwise, there really isn't a way to retrieve the exact original code because most variable names would have been replaced with meaningless one- or two- character strings. All the logic is still intact in the compacted script but it can quickly get very confusing to follow manually.
casablanca
2010-07-20 06:44:04