diff --git a/frontend/src/html/pages/leaderboards.html b/frontend/src/html/pages/leaderboards.html index 04b2e8eb5885..501c423798a4 100644 --- a/frontend/src/html/pages/leaderboards.html +++ b/frontend/src/html/pages/leaderboards.html @@ -49,8 +49,21 @@
| - | # | ++ + + + | ++ + # + + + | name |
wpm
diff --git a/frontend/src/security-policy.html b/frontend/src/security-policy.html
index 939faa39dd7d..4e9a70600ef5 100644
--- a/frontend/src/security-policy.html
+++ b/frontend/src/security-policy.html
@@ -137,7 +137,8 @@ How to Disclose a Vulnerabilityemail . - For non-security related platform bugs, follow the bug submission + For non-security related platform bugs, follow the bug + submission How to Disclose a Vulnerability . - Include as much detail as possible to ensure reproducibility. At a - minimum, vulnerability disclosures should include: + Include as much detail as possible to ensure reproducibility. At + a minimum, vulnerability disclosures should include:
${entry.friendsRank ?? ""} |
- ${
- entry.rank === 1 ? '' : entry.rank
- } |
+ ${formatRank(entry.friendsRank)} |
+ ${formatRank(entry.rank)} |
|
@@ -504,9 +502,7 @@ function buildWeeklyTableRow(
element.dataset["uid"] = entry.uid;
element.innerHTML = `
- | ${
- entry.rank === 1 ? '' : entry.rank
- } |
+ ${formatRank(entry.rank)} |
|
@@ -718,9 +714,7 @@ function fillUser(): void {
};
const html = `
- ${
- rank === 1 ? '' : rank
- }
+ ${formatRank(rank)}
You (${percentileString})
${diffText}
@@ -811,11 +805,7 @@ function fillUser(): void {
};
const html = `
- ${
- userData.rank === 1
- ? ''
- : userData.rank
- }
+ ${formatRank(userData.rank)}
You (${percentileString})
${diffText}
@@ -1390,6 +1380,13 @@ function updateTimeText(
text.attr("aria-label", localDateString);
}
+function formatRank(rank: number | undefined): string {
+ if (rank === undefined) return "";
+ if (rank === 1) return '';
+
+ return rank.toString();
+}
+
$(".page.pageLeaderboards .jumpButtons button").on("click", function () {
const action = $(this).data("action") as Action;
if (action !== "goToPage") {
|