Add snipnet in JavaScript.