set up javascript environment