Curiosity is bliss    Archive    Feed    About    Search

Julien Couvreur's programming blog and more

Ubiquity command: beautify-js

 

Spaghetti Code The 'beautify-js' command makes it easy to format javascript code.
This is useful when you develop a Ubiquity command in the Ubiquity editor (chrome://ubiquity/content/editor.html).

Read on to install.



By now, the Ubiquity prompt should have appeared at the top of the page (saying "This page contains Ubiquity commands. If you'd like to subscribe to them, please click on the button to the right.").
If the notification does not appear, make sure that you have installed the Ubiquity add-on.

After you install the command, open any page with a textarea containing javascript, select the code then run the Ubiquity command "beautify-js".

______________________________________

It broke for me. I copied the source from http://ubiquitously.org/forum/viewtopic.php?f=4&t=30 into the command editor and ran beautify-js on it, but it lost half the contents! :(

Posted by: panda (September 1, 2008 04:42 PM) ______________________________________

Thanks panda. I can repro the issue.

I'm not sure if it is a problem with the javascript which you are trying to beautify, or the beautify-js command. Let me investigate to figure it out.

In the meantime, if this happens, you can revert the beautification with Undo (Ctrl-Z).

Posted by: Julien (September 2, 2008 10:57 AM) ______________________________________

Hi Julien, just a thank you - the script seems to work really well and hasn't broken anything (yet :P)

Cheers,

Peter

Posted by: Peter (September 12, 2008 09:37 PM)
comments powered by Disqus