JavaScript detect alert and stop it from showing : <p>I am using a 3rd party js that shows <code>alert</code>'s to the user, is there a way to catch the alert before it is displayed, and show something else instead? example:</p>

<pre><code>function doOtherPeopleCode(){
   sdk.doStuff(); //catch all sdk alerts
}
</code></pre>
