This can come in handy on a production deployment, or when working with people with bad habits... It turns every call to alert to a call to console.log :

window.alert = function(msg) { console.log(msg); };