Put javascript in index file