Warning: A few vulnerabilities in this commit, don't use outside a test environment
66 lines
1.5 KiB
HTML
66 lines
1.5 KiB
HTML
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<link rel="stylesheet" href="./css/RSVP.css">
|
|
<style>
|
|
body {
|
|
overflow: hidden;
|
|
background: radial-gradient(closest-side, #ffffff, #d9d9ea);
|
|
font-size: 64px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="sReader_outputTextDiv">
|
|
<p id="sReader_outputText"></p>
|
|
</div>
|
|
|
|
<div class="sReader_3rdPanel" style="left: 32px;">
|
|
<center><p id="sReader_wordLog"></p></center>
|
|
</div>
|
|
|
|
<script src="js/RSVP.js"></script>
|
|
<script>
|
|
debug = false;
|
|
incoming = "";
|
|
|
|
function httpGet(theUrl)
|
|
{
|
|
// https://stackoverflow.com/a/4033310
|
|
var xmlHttp = new XMLHttpRequest();
|
|
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
|
|
xmlHttp.send( null );
|
|
return xmlHttp.responseText;
|
|
}
|
|
|
|
function checkIncoming()
|
|
{
|
|
newIncoming = httpGet("./input.dat?rand="+new Date().getTime() / 1000);
|
|
firstrun = (incoming == "");
|
|
if (incoming != newIncoming)
|
|
{
|
|
incoming = newIncoming;
|
|
if (!firstrun)
|
|
{
|
|
sReader_printString(incoming);
|
|
}
|
|
}
|
|
}
|
|
|
|
function onload()
|
|
{
|
|
sReader_printString("Loaded. Ready to connect...");
|
|
setInterval(
|
|
function()
|
|
{
|
|
checkIncoming();
|
|
}, 100
|
|
);
|
|
}
|
|
|
|
document.onload = onload();
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|