RSVPInterface/RSVPInterface.html
Joe Adams 7e6a655d5f Added proof of concept network input / output (polls input.dat), simple PHP input page
Warning: A few vulnerabilities in this commit, don't use outside a test environment
2019-06-21 20:35:08 +01:00

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>