Add javascript snippet