Rewrite alert.js to alert.coffee