rewrite a string in client.js