title: Replace alert window
body: <p>I use in my project third-party <strong>obfuscated</strong> JS library. The matter is it uses standard alert window for notifications. My task is to replace this browser alert window with my custom. My solution is:</p>
  
  <pre><code>alert = function(msg) {
      customAlert(msg);
  }
  </code></pre>
  
  <p>Is there any another, may be better way to solve this problem?</p>