Update StackMonkey.ps1
This commit is contained in:
@@ -830,7 +830,11 @@ $style = @'
|
|||||||
}, 10_000);
|
}, 10_000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// when the browser window is closed (X), notify the server to quit
|
||||||
|
window.addEventListener('beforeunload', () => {
|
||||||
|
// keepalive: true ensures the request is sent even as the page unloads
|
||||||
|
fetch('/quit', { method: 'GET', keepalive: true });
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user