Fixed minor things

This commit is contained in:
lkarch 2025-05-22 13:48:27 -04:00
parent cc4e95a6d2
commit 1c909651f3
2 changed files with 10 additions and 10 deletions

View File

@ -53,15 +53,15 @@ function switchSection(sectionName, button) {
} }
function loadRulersAndElectionCountdown() { function loadRulersAndElectionCountdown() {
console.log(nnRuler); console.log("Ruler found: \"" + nnRuler + "\"");
document.getElementById("ruler").innerText = nnRuler; document.getElementById("ruler").innerText = nnRuler;
document.getElementById("rulerImage").src = "https://minotar.net/armor/body/" + nnRuler + "/100.png"; document.getElementById("rulerImage").src = "https://minotar.net/armor/body/" + nnRuler + "/100.png";
console.log(nnCoRuler); console.log("Co-ruler found: \"" + nnCoRuler + "\"");
document.getElementById("coRuler").innerText = nnCoRuler; document.getElementById("coRuler").innerText = nnCoRuler;
document.getElementById("coRulerImage").src = "https://minotar.net/armor/body/" + nnCoRuler + "/100.png"; document.getElementById("coRulerImage").src = "https://minotar.net/armor/body/" + nnCoRuler + "/100.png";
console.log(calculateCountdown(electionDate)); console.log("Next election occurs in " + calculateCountdown(electionDate) + " days");
if (Math.ceil(calculateCountdown(electionDate)) <= 0) { if (Math.ceil(calculateCountdown(electionDate)) <= 0) {
@ -82,17 +82,17 @@ function loadMemberList() {
} }
function onPageLoad() { function onPageLoad() {
loadRulersAndElectionCountdown()
loadMemberList()
if (url.searchParams.has("section")) { if (url.searchParams.has("section")) {
console.log("URL parameter found, forcing section to " + url.searchParams.get("section") + "."); console.log("URL parameter found, forcing section to \"" + url.searchParams.get("section") + "\"");
document.getElementById(url.searchParams.get("section") + "Button").click(); document.getElementById(url.searchParams.get("section") + "Button").click();
} else if (getCookie("section") === "") { } else if (getCookie("section") === "") {
console.log("A wild user appears! Defaulting to first section, \"" + sectionList[0].id + "\".") console.log("A wild user appears! Defaulting to first section, \"" + sectionList[0].id + "\"")
document.getElementById(sectionList[0].id + "Button").click(); document.getElementById(sectionList[0].id + "Button").click();
} else { } else {
console.log("Section cookie found, restoring section to \"" + getCookie("section") + "\"."); console.log("Section cookie found, restoring section to \"" + getCookie("section") + "\"");
document.getElementById(getCookie("section") + "Button").click(); document.getElementById(getCookie("section") + "Button").click();
} }
loadRulersAndElectionCountdown()
loadMemberList()
} }

View File

@ -4,7 +4,7 @@
<title>New Nameful</title> <title>New Nameful</title>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="description" content="Tellow approves!!!!!" /> <meta name="description" content="Tellow approves!!!!!" />
<meta name="keywords" content="lkarch, website, new nameful, election" /> <meta name="keywords" content="new nameful, minecraft, election, beta minecraft, b1.7.3, town" />
<meta author="lkarch" /> <meta author="lkarch" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/assets/stylesheets/index.css" /> <link rel="stylesheet" href="/assets/stylesheets/index.css" />