summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/main.js2
-rw-r--r--static/register.html5
-rw-r--r--static/submission.js2
3 files changed, 7 insertions, 2 deletions
diff --git a/static/main.js b/static/main.js
index b3bf50f..1c2dbc1 100644
--- a/static/main.js
+++ b/static/main.js
@@ -83,7 +83,7 @@ function create_problem_element(problem, submissions) {
sub_row.appendChild(sub_lang);
const sub_size = document.createElement("td");
- sub_size.innerHTML = submission.code.length;
+ sub_size.innerHTML = `${submission.code_length} bytes`;
sub_row.appendChild(sub_size);
const sub_subm = document.createElement("td");
diff --git a/static/register.html b/static/register.html
index d7e183c..9f3b651 100644
--- a/static/register.html
+++ b/static/register.html
@@ -21,6 +21,8 @@
<span id="error-message" style="color: red"></span>
<br><br>
</div>
+ <p>Usernames should consist only of letters, numbers, underscores, and hyphens.</p>
+ <p>To help mitigate unauthorized access to my server, a registration code is required to create an account. Please see Daniel for the code.</p>
<label for="register-email">Email</label><br>
<input type="text" id="register-email" name="email">
<br><br>
@@ -30,6 +32,9 @@
<label for="register-password">Password</label><br>
<input type="password" id="register-password" name="password">
<br><br>
+ <label for="register-code">Registration Code</label><br>
+ <input type="password" id="register-code" name="register_code">
+ <br><br>
<input type="submit" value="Register">
</form>
diff --git a/static/submission.js b/static/submission.js
index bbe4075..4fbcf23 100644
--- a/static/submission.js
+++ b/static/submission.js
@@ -27,7 +27,7 @@ async function init() {
problem_div.appendChild(description);
document.getElementById("submission-author").innerHTML = `by ${submission.username}`;
- document.getElementById("submission-size").innerHTML = `${new Blob([submission.code]).size} bytes`;
+ document.getElementById("submission-size").innerHTML = `${submission.code_length} bytes`;
document.getElementById("submission-details").innerHTML = submission.details;
document.getElementById("submission-code").innerHTML = submission.code;