title: Overwrite window.close without popup message
body: <p>Here we go again. I have an IE issue. There is an application installed on my server, which uses the function <code>window.close()</code>. As soon as you click <em>Close</em>, a popup warning message appears and if you click on <em>Yes</em> . Make sense, yes, but I would like to overwrite this function in my <strong>custom.js</strong></p>
  
  <p>I would like to prevent the popup and redirect to another site. This is what I tried:  </p>
  
  <pre><code>function realClose() {
       alert("test");
       var win=window.open("","_top","","true");
       win.opener=true;
       win.realclosefunc();
       window.location = "/";
  }
  
  window.realclosefunc = window.close;
  window.close = realClose;
  </code></pre>