2017-04-25 23:14:34 +00:00
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
2020-04-16 22:22:39 +00:00
|
|
|
function preventNextBeforeUnload() {
|
|
|
|
window.addEventListener('beforeunload', function handler(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.returnValue = '';
|
|
|
|
window.removeEventListener('beforeunload', handler)
|
|
|
|
setTimeout(function() {
|
|
|
|
require('electron').ipcRenderer.sendSync('onbeforeunload')
|
|
|
|
}, 0);
|
2017-04-25 23:14:34 +00:00
|
|
|
return false;
|
2020-04-16 22:22:39 +00:00
|
|
|
})
|
2017-04-25 23:14:34 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|