Added some javascript snippets