1

Yesterday I lost the backup of my custom jquery lib file, and I just have the min file for it.Is there any way i can convert/decompress the min file back, so that i can do some work on it?

2
  • You mean you want to change the variable names, which are now just single characters, to some meaningful name using some kind of converter? that is not possible. Commented Aug 8, 2013 at 5:10
  • 3
    I recommend looking harder for something like a cached copy of your code or a soft-deleted file in a Recycle Bin somewhere. Also, in the future, source control synced to an online repository may be advisable. Commented Aug 8, 2013 at 5:12

2 Answers 2

1

Minification often changes the names of variables, combines files, and makes optimizations. A program can't guess at variable names, decide where files should be split, and (shouldn't) make your code perform worse.

Indentation

You can have your code properly indented by using a service like jsbeautifier.

Variable Names

Using an editor, like WebStorm, you can refactor variable names. This means that you select one variable, change the name, and anywhere else it's referenced will also have the new name. It might take a bit.

Splitting Files

This can be done by hand fairly easily. I recommend an editor with tabs to make it less painful.

Sign up to request clarification or add additional context in comments.

5 Comments

Can't he just download the jquery source from jquery.com or google?
@Mr_Green, no, he modified the source, minified his own version, and then lost the modified source but retained his custom minified version.
ohh then he can use some file comparing software to compare with jquery source code after what you recommended in your solution.
You understood my problem right @FakeRainBrigand.I Tried using jsbeautifier but its giving extra spaces. code .ui - helper - reset { margin: 0; padding: 0; border: 0; outline: 0; line - height: 1.3; text - decoration: none; font - size: 100 % ; list - style: none }.ui - helper - clearfix: before, .ui - helper - clearfix:
That doesn't look like JavaScript... that's CSS... try this instead
1

Try this too: http://unminify.com/ it may be usefull.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.