move inline js out of view