From fe5c9095816b1e738be69b8d25cbb72cf149ec36 Mon Sep 17 00:00:00 2001
From: GamingasCZ <51487573+GamingasCZ@users.noreply.github.com>
Date: Tue, 8 Mar 2022 14:23:08 +0100
Subject: [PATCH] Trophies now work lmao (#205)
---
html/profile.html | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/html/profile.html b/html/profile.html
index f0de568..f5dd451 100644
--- a/html/profile.html
+++ b/html/profile.html
@@ -77,7 +77,7 @@
-
[[RANK]]
+
[[RANK]]
@@ -200,6 +200,16 @@ if (`[[YOUTUBE]]` != "null") $('#youtube').show()
if (`[[TWITTER]]` != "null") $('#twitter').show()
if (`[[TWITCH]]` != "null") $('#twitch').show()
+let numRank = parseInt("[[RANK]]")
+if (numRank < 2) $(".profileTrophy").attr("src","../assets/trophies/1.png")
+else if (numRank <= 10) $(".profileTrophy").attr("src","../assets/trophies/2.png")
+else if (numRank <= 50 ) $(".profileTrophy").attr("src","../assets/trophies/3.png")
+else if (numRank <= 100) $(".profileTrophy").attr("src","../assets/trophies/4.png")
+else if (numRank <= 200) $(".profileTrophy").attr("src","../assets/trophies/5.png")
+else if (numRank <= 500) $(".profileTrophy").attr("src","../assets/trophies/6.png")
+else if (numRank <= 1000) $(".profileTrophy").attr("src","../assets/trophies/7.png")
+else $(".profileTrophy").attr("src","../assets/trophies/0.png")
+
let messages = "[[MESSAGES]]"
let commenthistory = "[[COMMENTHISTORY]]"
@@ -415,4 +425,4 @@ $(document).keydown(function(k) {
})
-
\ No newline at end of file
+