2013-09-02 08:54:54 +00:00
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
2016-08-03 19:44:18 +00:00
|
|
|
// Only prevent unload on the first window close
|
|
|
|
var unloadPrevented = false;
|
2013-09-02 08:54:54 +00:00
|
|
|
window.onbeforeunload = function() {
|
|
|
|
setTimeout(function() {
|
2019-11-14 22:09:03 +00:00
|
|
|
require('electron').ipcRenderer.sendSync('onbeforeunload');
|
2013-09-02 08:54:54 +00:00
|
|
|
}, 0);
|
2016-08-03 19:44:18 +00:00
|
|
|
|
|
|
|
if (!unloadPrevented) {
|
|
|
|
unloadPrevented = true;
|
|
|
|
return '';
|
|
|
|
}
|
2013-09-02 08:54:54 +00:00
|
|
|
}
|
2019-07-02 20:48:58 +00:00
|
|
|
window.onload = () => window.close();
|
2013-09-02 08:54:54 +00:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|