Improved JavaScript editing mode