fixing javascript for heroku