Introducing AT JS Deminifier

If you’re one of those developers familiar with Chrome Dev Tools, but preferring Firebug, you’re probably missing Chrome’s ability to pretty-print the code on demand. Or, you know about Javascript Deminifier add-on.

The mentioned Firefox/Firebug extension is of limited reliability at times, but it’s still better than nothing. However, if you tried using it on a page that has a minified Aria Templates application, it would usually fail. The reason is a special file format used to bundle classes together into AT packages. After the JSD processes such a file, its structure gets heavily altered and the Aria Templates framework loader can’t load the so-called multipart files any longer.

If you want to be able to run Javascript Deminifier on pages using Aria Templates, you might consider to replace the add-on with our fork which handles the mentioned case.

You can download and install it directly from sources following the steps described in this GitHub repo:

https://github.com/jakub-g/atjsd

Once you’ve done that and restarted the browser, you can head to AT TodoMVC or browse AT samples and once you activate ATJSD, you’ll see deminified code in Firebug.

Remember that you have to activate ATJSD in each browser’s tab, by switching “ATJSD ON/OFF” button in your add-on bar. By default it’s always disabled.

Aria Templates code with ATJSD off and on

Note that this extension just adds “Aria Templates awareness” on top of the existing Javascript Deminifier extension. It might be susceptible to all the issues the original extension has (feel invited to contribute on GitHub if you found some issues and have solutions for them).

The code is deminified, i.e. split into lines and formatted, hence at least you can put breakpoints in the code and have a general sense of what’s going on.

Note that the best way to actually debug the code would be to (whenever possible) use Fiddler and redirect the framework to the non-minified version available via our CDN which we will describe shortly in another article. Stay tuned!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>