Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I beautify JavaScript and CSS in Firefox / Firebug?

Is there a way to beautify JavaScript and CSS in Firebug?

I'd like to be able to view formatted JavaScript code instead of the compressed version :).

like image 503
Lance Avatar asked Jul 09 '10 21:07

Lance


People also ask

What is pretty print this Minified file?

at the bottom of the source pane. The debugger formats the source and displays it as a new file with a name like: “{ } [original-name]”. The Pretty print source icon is available only if the source file is minified (i.e., not an original file), and is not already “prettified”.

What happened to Firebug for Firefox?

The Firebug web development tool, an open source add-on to the Firefox browser, is being discontinued after 12 years, replaced by Firefox Developer Tools.

How do I show scripts in Firefox?

from the menu: select “Browser Console” from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on macOS). from the keyboard: press Ctrl + Shift + J (or Cmd + Shift + J on a Mac).


Video Answer


1 Answers

There is now a plugin that intercepts JavaScript downloads and deminifies it at that point.

Unfortunately, the way it hooks into Firefox means that it applies to all JavaScript downloads and just not specific ones and the JavaScript files have to be served with an appropriate MIME type.

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

like image 124
benmmurphy Avatar answered Oct 01 '22 21:10

benmmurphy