add javascript snippets