forked from mbk-lab/rui_orig
24 lines
479 B
JavaScript
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{}" );
|
|
}
|