modify js snippets