Added javascript snippets