Fix display consistency of JavaScript code