add javascript defintion code