Mirror text in JavaScript