forked from mbk-lab/rui_orig
2
0
Fork 0
rui/app_post.js

24 lines
479 B
JavaScript
Raw Normal View History

2024-03-12 19:32:22 +03:00
function sendMessage(message) {
let xhr = new XMLHttpRequest();
xhr.open('POST', '/', true);
xhr.onreadystatechange = function() {
const script = this.responseText
if (script != "") {
window.eval(script)
//sendMessage("nop{session=" + sessionID +"}")
}
}
xhr.send(message);
}
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
}