add some javascript snippets