reformate js code