delete trailing white space when save js