[TxMt] improved javascript foldings