kopia lustrzana https://github.com/inkstitch/inkstitch
fix beforeunload hook
rodzic
fe481cbb7f
commit
b438a8e004
print/resources
|
@ -1,10 +1,10 @@
|
|||
$(function() {
|
||||
|
||||
// If the window is closed, we still want to be sure to shutdown the server
|
||||
window.addEventListener('beforeunload', setTimeout(function() {
|
||||
window.addEventListener('beforeunload', function() {
|
||||
$.post('/shutdown', {})
|
||||
}), 1000);
|
||||
|
||||
});
|
||||
|
||||
$('button.close').click(function() {
|
||||
$.post('/shutdown', {})
|
||||
.done(function(data) {
|
||||
|
|
Ładowanie…
Reference in New Issue