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

24 lines
479 B
JavaScript

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() );
}
window.onfocus = function() {
windowFocus = true
sendMessage( "session-resume{}" );
}