optional javascript for screenshots