Edit js code for index page