Feature: Leaderboard difficulty isolation, proposal category select, numeric answer matcher, 25 new questions (65 total)
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
const total = {{ total }};
|
||||
const maxScore = {{ max_score }};
|
||||
const timeSec = {{ time_seconds }};
|
||||
const difficulty = "{{ difficulty }}";
|
||||
let scoreAlreadySubmitted = false;
|
||||
|
||||
const WIZARD_NAMES = {
|
||||
@@ -350,7 +351,7 @@
|
||||
score: score,
|
||||
total_questions: total,
|
||||
time_seconds: timeSec,
|
||||
difficulty: "all",
|
||||
difficulty: difficulty,
|
||||
lang: currentLang
|
||||
})
|
||||
});
|
||||
@@ -386,7 +387,8 @@
|
||||
|
||||
async function loadMiniLeaderboard() {
|
||||
try {
|
||||
const res = await fetch("/api/leaderboard?limit=5");
|
||||
const url = "/api/leaderboard?limit=5" + (difficulty && difficulty !== "all" ? `&difficulty=${encodeURIComponent(difficulty)}` : "");
|
||||
const res = await fetch(url);
|
||||
const entries = await res.json();
|
||||
const body = document.getElementById("miniLbBody");
|
||||
const container = document.getElementById("miniLbContainer");
|
||||
|
||||
Reference in New Issue
Block a user