update js snippets