Loading ...
Sorry, an error occurred while loading the content.
 

Re: to make more readable script

Expand Messages
  • thad_floryan
    ... I d just use emacs javascript mode and, voila, done. Google searching javascript formatter (without the quotes) returns a number of interesting hits.
    Message 1 of 5 , Dec 7 4:52 PM
      --- In linux@yahoogroups.com, "dul" <dullohmail@...> wrote:
      > [...]
      > I found something script in javascript like:
      >
      > function showMenu(menuId){(obj=document.getElementById(menuId).style).top='0px';obj.left='0px';obj.display='inline'; return true;}
      >
      > I wanna convert that script to more readable like:
      >
      > function showMenu(menuId)
      > {
      > (obj=document.getElementById(menuId).style).top='0px';
      > obj.left='0px';
      > obj.display='inline';
      > return true;
      > }
      >
      > is there program in ubuntu/linux to make more readable like that? :)

      I'd just use emacs' javascript mode and, voila, done.

      Google searching "javascript formatter" (without the quotes) returns
      a number of interesting hits.
    • Dul Cangkul
      ... oh, I didn t know if emac can do that i usually use gedit, oh, my bad, I can t find voila in ubuntu repo what is voila? is it emac plugin or another
      Message 2 of 5 , Dec 7 5:31 PM
        >Sent: Wed, December 8, 2010 7:52:11 AM
        >
        >
        >--- In linux@yahoogroups.com, "dul" <dullohmail@...> wrote:
        >> [...]
        >> I found something script in javascript like:
        >>
        >> function
        >>showMenu(menuId){(obj=document.getElementById(menuId).style).top='0px';obj.left='0px';obj.display='inline';
        >>
        >> return true;}
        >>
        >> I wanna convert that script to more readable like:
        >>
        >> function showMenu(menuId)
        >> {
        >> (obj=document.getElementById(menuId).style).top='0px';
        >> obj.left='0px';
        >> obj.display='inline';
        >> return true;
        >> }
        >>
        >> is there program in ubuntu/linux to make more readable like that? :)
        >
        >I'd just use emacs' javascript mode and, voila, done.
        >
        >Google searching "javascript formatter" (without the quotes) returns
        >a number of interesting hits.
        >
        oh, I didn't know if emac can do that
        i usually use gedit,
        oh, my bad, I can't find voila in ubuntu repo
        what is voila? is it emac plugin or another standalone program?

        btw thanks for answers, mr. programmer
      • thad_floryan
        ... voila is French for it just works like magic . :-) See also Heh, I wouldn t be surprised if there is
        Message 3 of 5 , Dec 7 7:21 PM
          --- In linux@yahoogroups.com, Dul Cangkul <dullohmail@...> wrote:
          >> [... missing attribution ...]
          >> I'd just use emacs' javascript mode and, voila, done.
          >>
          >> Google searching "javascript formatter" (without the quotes) returns
          >> a number of interesting hits.
          >>
          > oh, I didn't know if emac can do that
          > i usually use gedit,
          > oh, my bad, I can't find voila in ubuntu repo
          > what is voila? is it emac plugin or another standalone program?

          "voila" is French for "it just works like magic". :-)

          See also <http://www.merriam-webster.com/dictionary/voila>

          Heh, I wouldn't be surprised if there is a "voila" Emacs library though
          I don't seem to have one on any of my systems. :-)

          Regarding emacs and javascript:

          <http://www.emacswiki.org/emacs/JavaScriptMode>

          <http://stackoverflow.com/questions/677721/emacs-javascript-auto-indentation>

          <http://mihai.bazon.net/projects/emacs-javascript-mode>

          <http://www.brgeight.se/downloads/emacs/javascript.el>

          and 40,500 other pages Googling "emacs javascript mode indentation".
        • Dul Cangkul
          ... lol, I m cheateddddd with strange word hahahaha :D sorry, just my mistake, it s nice to know your nation word I ll try your suggest thanks a lot
          Message 4 of 5 , Dec 8 12:21 AM
            >
            >--- In linux@yahoogroups.com, Dul Cangkul <dullohmail@...> wrote:
            >>> [... missing attribution ...]
            >>> I'd just use emacs' javascript mode and, voila, done.
            >>>
            >>> Google searching "javascript formatter" (without the quotes) returns
            >>> a number of interesting hits.
            >>>
            >> oh, I didn't know if emac can do that
            >> i usually use gedit,
            >> oh, my bad, I can't find voila in ubuntu repo
            >> what is voila? is it emac plugin or another standalone program?
            >
            >"voila" is French for "it just works like magic". :-)
            >
            >See also <http://www.merriam-webster.com/dictionary/voila>
            >
            >Heh, I wouldn't be surprised if there is a "voila" Emacs library though
            >I don't seem to have one on any of my systems. :-)
            >
            >Regarding emacs and javascript:
            >
            ><http://www.emacswiki.org/emacs/JavaScriptMode>
            >
            ><http://stackoverflow.com/questions/677721/emacs-javascript-auto-indentation>
            >
            ><http://mihai.bazon.net/projects/emacs-javascript-mode>
            >
            ><http://www.brgeight.se/downloads/emacs/javascript.el>
            >
            >and 40,500 other pages Googling "emacs javascript mode indentation".

            lol, I'm cheateddddd with strange word hahahaha :D
            sorry, just my mistake, it's nice to know your nation word
            I'll try your suggest

            thanks a lot
          Your message has been successfully submitted and would be delivered to recipients shortly.