2024-03-12 19:32:22 +03:00
|
|
|
|
2024-04-22 13:09:35 +03:00
|
|
|
async function sendMessage(message) {
|
|
|
|
const response = await fetch('/', {
|
|
|
|
method : 'POST',
|
|
|
|
body : message,
|
|
|
|
"Content-Type" : "text/plain",
|
|
|
|
});
|
|
|
|
|
|
|
|
const text = await response.text();
|
|
|
|
if (text != "") {
|
|
|
|
window.eval(text)
|
|
|
|
}
|
2024-03-12 19:32:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
window.onload = function() {
|
|
|
|
sendMessage( sessionInfo() );
|
|
|
|
}
|
|
|
|
|
2024-03-13 15:01:02 +03:00
|
|
|
window.onfocus = function() {
|
2024-03-12 19:32:22 +03:00
|
|
|
windowFocus = true
|
2024-03-13 15:01:02 +03:00
|
|
|
sendMessage( "session-resume{}" );
|
2024-03-12 19:32:22 +03:00
|
|
|
}
|
2024-04-27 16:16:30 +03:00
|
|
|
|
|
|
|
function closeSocket() {
|
|
|
|
}
|