Replace javascript syntax by a more standard and readable one