snippets for different javascript libraries