Add a javascript AI snippet.