update snippet.js