updates javascript snippets