Remove legacy stuff from theme

This commit is contained in:
Neale Pickett 2020-12-02 17:06:59 -07:00
parent 9c118f83b0
commit 2297fc7fd7
3 changed files with 0 additions and 29 deletions

View File

@ -33,7 +33,6 @@
<ul>
<li><a href="scoreboard.html">Scoreboard</a></li>
<li><a href="logout.html">Sign Out</a></li>
<li id="cacheButton" class="disabled"><a href="#" onclick='fetchAll()' title="Cache am offline copy of current content">Cache</a></li>
</ul>
</nav>
</body>

View File

@ -109,9 +109,6 @@ function renderState(obj) {
renderPuzzles(obj.Puzzles)
} else if (Object.keys(obj.Puzzles).length > 0) {
renderPuzzles(obj.Puzzles)
if (obj.Config.Detachable) {
fetchAll(obj.Puzzles)
}
}
renderNotices(obj.Messages)
}
@ -151,30 +148,6 @@ function showPuzzles() {
document.getElementById("puzzles").appendChild(spinner)
}
async function fetchAll(puzzles) {
let teamId = sessionStorage.id
console.log("Caching all currently-open content")
for (let cat in puzzles) {
for (let points of puzzles[cat]) {
let resp = await fetch(cat + "/" + points + "/")
if (! resp.ok) {
continue
}
let obj = await resp.json()
for (let file of obj.files) {
fetch(cat + "/" + points + "/" + file.name)
}
for (let file of obj.scripts) {
fetch(cat + "/" + points + "/" + file.name)
}
}
}
console.log("Done caching content")
}
function login(e) {
e.preventDefault()
let name = document.querySelector("[name=name]").value

View File

@ -1 +0,0 @@
<!-- notices.html: contents will be rendered verbatim in the puzzles overview. -->