Trim javascript