add javascript snippet