Update switch_snippet.js