Updating JavaScript snippets