add JavaScript snippets