update html and javascript snippets