I'm looking for a tool that unminifies a JS file, while restoring the variable names in the whole document.
For example, after running the minified code at unminify.com, the code itself contains:
W.find("li.patternItem").click(function() {
and at the end of the code there is a reference defining W:
W = $("#pattern1")
So I am looking for a simple script to restore the name inside the code, but can't find one. I understand the auto replace might be harmful for the code, but I guess that there should be some smart way to restore. Right now I'm doing it manually and replacing "W." with "$("#pattern1")." (match case, with dot at the end) so it won't be mixed with any W letter.
Thanks
This tool may help:
http://www.jsnice.org/
This unminifies your js and will make educated guesses as to what the original variables were for and rename them automatically.
It also allows you to replace them in the final code with what you want in an easy way (use interactive renames in the tools menu).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With