rui_orig/app_post.js

26 lines
422 B
JavaScript
Raw Normal View History

2024-03-12 19:32:22 +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
}
function closeSocket() {
}