How to read compacted javascript?
There are many compacted javascript source code in web and I am wonder how 开发者_如何学Goto transfer it to the normal code and make it readable? Are there any exsited tools or scripts?
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.
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.
精彩评论