<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="/reset.css">
<link rel="stylesheet" type="text/css" href="/sig.css">
<meta charset="UTF-8">
<script type="text/javascript">
    function loadCodeBackground() {
        fetch("/codeBackground").then((data)=>data.text())
        .then((data)=>{
            document.getElementById("codeForeground").innerText=data
            document.getElementById("codeBackground").innerText=data
        })
    }
    loadCodeBackground();
</script>
</head>
<body>
<div class="navbar">
    <div class="navbaritem"><a href="/">HOME</a></div>
    <div class="navbaritem"><a href="/blog.html">BLOG</a></div>
    <div class="navbaritem"><a href="/arcade.html">ARCADE</a></div>
    <div class="navbaritem"><a href="/stream.html">STREAM</a></div><div id="liveindicator"></div>
    <div class="navbaritem"><a href="/code.html">CODING SERVICES</a></div>
    <div class="socials">
        <div class="navbaritem"><a href="/code.html">DISCORD</a></div>
        <div class="navbaritem"><a href="/code.html">GITHUB</a></div>
        <div class="navbaritem"><a href="/code.html">TWITCH</a></div>
        <div class="navbaritem"><a href="/code.html">YOUTUBE</a></div>
        <div class="navbaritem"><a href="/code.html">TWITTER</a></div>
    </div>
</div>
<script type="text/javascript">
    function getLiveStatus() {
        document.getElementById("liveindicator").innerHTML="<a href=\"/stream.html\">🔴 LIVE</a>"
    }
    getLiveStatus()
</script>
<div class="contentBody"> 
SigPlace
-SigPlace
===
<div class="gamenav">
    <div class="game">DDR</div>
    <div class="game">ITG</div>
    <div class="game">Sound Voltex</div>
    <div class="game">Pop'n Music</div>
    <div class="game">Love Live</div>
</div>
<div id="arcade_content">
</div>
<br/><br/>
<script type="text/javascript">
    function grabData(field,location){
        fetch(location,{cache: "no-cache"}).then((data)=>data.text())
        .then((data)=>{
            var c = document.getElementById(field)
            var split = data.split("\n")
            var count=0;
            for (var play of split) {
                if (play!=="") {
                    var obj = JSON.parse(play)
                    c.innerHTML+=`<div id="${field}${count++}">${obj.game}: ${obj.rank} [${obj.difficulty}] ${obj.title} ${obj.score} (${obj.notes})</div>`
                }
            }
        })
    }
    function recentPlays(){
        var content = document.getElementById("arcade_content")
        grabData("records","/RECORDS")
        grabData("plays","/PLAYS")
        content.innerHTML=`
        <h2>Recent Records</h2>
        <div id="records"></div>
        <h2>Recent Plays</h2>
        <div id="plays"></div>`
    }
    recentPlays()
</script>
</div> <!--End Content Body-->
<div class="codeForeground" id="codeForeground"></div>
<div class="codeBackground" id="codeBackground"></div>
</body>
<footer>
</footer>
</html>