#711 moved js code to new.js
Merge pull request #801 from oliverds/master

#711 moved js code to new.js