Update StackMonkey.ps1

This commit is contained in:
2025-05-28 23:46:07 -04:00
parent a35ce22ae3
commit 4b11e94890

View File

@@ -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>