diff --git a/main.css b/main.css index af630cf..344c0be 100644 --- a/main.css +++ b/main.css @@ -22,7 +22,8 @@ --zelda-border-light: #4f77cd; --zelda-border-dark: #1c2a49; --zelda-bg: #2f487c; - --zelda-button-width: calc(145px*var(--scaling-factor)); + --zelda-file-button-width: calc(145px*var(--scaling-factor)); + --zelda-button-width: calc(174px*var(--scaling-factor)); --zelda-button-font-size: calc(22px*var(--scaling-factor)); --zelda-content-font-size: calc(18px*var(--scaling-factor)); } @@ -73,6 +74,7 @@ a:hover font-size: var(--zelda-button-font-size); padding-top: calc(10px*var(--scaling-factor)); width: var(--zelda-button-width); + text-align: center; } @@ -84,7 +86,7 @@ a:hover .zelda-file-box-slot { color: black; - width: var(--zelda-button-width); + width: var(--zelda-file-button-width); float: left; text-align: center; text-shadow: 0px 0px calc(4px*var(--scaling-factor));; @@ -99,12 +101,12 @@ a:hover border-bottom-style: none; border-bottom-left-radius: 0; border-bottom-right-radius: 0; - margin-left: var(--zelda-button-width); + margin-left: var(--zelda-file-button-width); } .zelda-file-box-hack_left { padding: 0; - width: var(--zelda-button-width); + width: var(--zelda-file-button-width); height: 0px; border-right-style: none; border-bottom-style: none; @@ -120,7 +122,7 @@ a:hover border-top-style: none; border-bottom-style: none; border-radius: 0; - margin-left: var(--zelda-button-width); + margin-left: var(--zelda-file-button-width); position: relative; } diff --git a/progress.html b/progress.html index 47e1c53..4167196 100644 --- a/progress.html +++ b/progress.html @@ -73,7 +73,7 @@ -
Match: No
+
Matching: No

Main Page
diff --git a/progress.js b/progress.js index b5b5d73..822fb46 100644 --- a/progress.js +++ b/progress.js @@ -2,13 +2,12 @@ var matching = false; var url = "reports/progress.csv"; var urlMatching = "reports/progress_matching.csv"; var currentVersion = 1; -var decimalPlaces = 4; function toggleMatching() { matching = !matching; var html = '' + (matching? "Yes" : "No") + ""; - document.getElementById("toggle_matching").innerHTML = "Match: " + html; + document.getElementById("toggle_matching").innerHTML = "Matching: " + html; updateProgress(); } @@ -48,12 +47,15 @@ function parseCsv(csv) nonMatchingCount: 0, }; - var lines = csv.split("\r\n"); + var lines = csv.split("\n"); var objs = [[]] for (var i = 0; i < lines.length; i++) { var values = lines[i].split(","); + if (values.length != 12) + continue; + if (values[0] != currentVersion) { alert("Invalid CSV"); @@ -78,7 +80,8 @@ function getPercent(progress, total) function updateProgress() { getResponse(matching? urlMatching : url, function(text) { - var progress = parseCsv(text)[0]; + var arr = parseCsv(text); + progress = arr[arr.length-1]; var date = new Date(progress.timestamp *1000); setText("last_change", date.toLocaleDateString() + " " + date.toLocaleTimeString()); @@ -87,11 +90,6 @@ function updateProgress() setText("boot_percent", getPercent(progress.boot, progress.bootSize)); setText("code_percent", getPercent(progress.code, progress.codeSize)); setText("overlay_percent", getPercent(progress.ovl, progress.ovlSize)); - - var keys = Object.keys(progress.reports[timestamp]); - keys.forEach(e => { - setText(e, progress.reports[timestamp][e] + "%"); - }); }); }