[javascript] How to remove part of a string?