collect js code