fix js snippets

fix js snippets