5

I have downloaded a minimized jquery plugin file and need to do some customization as per my project requirements. I am using Visual Studio 2010. And because the file is minimized, it is becoming very difficult to debug it or perform any modifications. Is there a way i can reformat the js file?

Thanks

3
  • I don't think so, why you just can look if exit's some version without minize what's the plugin?? Commented Dec 20, 2011 at 20:10
  • I am using jquery slideshow from here - addyosmani.com/resources/coverflow/demo/demo.html It is just the minimized version, dont have the original copy for download Commented Dec 20, 2011 at 20:11
  • It looks like there are a few plugins used as well for that as well. Minimization does things like rename variables among other things which make the code harder to read. You're best bet really is to try to find the pre-minimized versions of the plugin you are after. That site was kind enough to allow directory access, though, so you might poke around here: addyosmani.com/resources/coverflow Commented Dec 20, 2011 at 20:25

4 Answers 4

8

You can add the formatting back by going to http://jsfiddle.net, pasting the code into the javascript pane, and then clicking Tidy Up at the top.

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

Comments

6

You can use jsbeautifier.org for javascript beautification. It also decode Dean Edward's packer.

Also in Visual Studio you can use this shortcut: ctrl+K, ctrl+D

3 Comments

I just did it as per what Kevin said. But jsbeautifier is also a great tool to reformat it. Thanks for the suggestion
You're welcome. You have Vote Up privilege, so you can show your appreciation voting up the answers you like. (I'm not talking about mine answer, any answer you like.)
Oh yes, i just realised i now have the voteup privilege, +1 goes to you :) Thanks
1

We can do this in chrome itself. All you have to do is open your particular script file in sources and by clicking curly braces at bottom of the page to get formatted script and we can copy and paste it in original file you want to.

Comments

0

You should be able to reformat javascript in Visual Studio. Open the javascript file, and select Edit | Advanced | Format Document or Format Selection.

1 Comment

Nope that didnt work. i tried it before posting this question.

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.