Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a plugin that allows me to automatically unminify the Javascript included on a site? [closed]

Is there a plugin, add-on, Greasemonkey script or something similar (at worst, an easy to use proxy?) that automatically unminifies the Javascript files included on a site?

I know about e.g. jsbeautifier.org but doing this externally doesn't allow me to set breakpoints in the unminified code, for example.

Typical use cases for me:

  • Analysing and learning from complex web frontends.
  • Debugging Greasemonkey scripts which interact with the existing code.

I'm primarily interested in a solution that works with Firebug, but if there's something for the dev tools of Chrome or Opera, I'd like to hear about it as well.

like image 598
Henrik Heimbuerger Avatar asked Nov 25 '10 16:11

Henrik Heimbuerger


People also ask

Can you Unminify JavaScript?

You can't unminify a minified file. You can use a beautifier to make it more readable, but you will have a weighty job of reverse engineering in order to understand what the code means.


2 Answers

Someone has made JSBeautifier into a Firebug plugin:

https://addons.mozilla.org/en-US/firefox/addon/javascript-deminifier/

This has made my day today!

like image 178
B T Avatar answered Sep 18 '22 19:09

B T


In chrome 13+, there is 'pretty print'.

  1. Right click 'inspect element'
  2. Go to Script tab
  3. Click the curly braces in the bottom right.

Screenshot

like image 21
Matthew Kelly Avatar answered Sep 21 '22 19:09

Matthew Kelly