commit bb195bd47fbb1d59d0db463e93e0f67076887270 Author: sigonasr2 Date: Sun Mar 19 14:24:49 2023 -0500 ITL live rank tracker completed diff --git a/tracker.css b/tracker.css new file mode 100644 index 0000000..1b8c208 --- /dev/null +++ b/tracker.css @@ -0,0 +1,48 @@ +body{ + background-color:lime; + font-family:"Calibri"; + font-weight:800; +} +.player{ + color:purple; + font-size:96px; + text-align:center; +} +.player .rankSymbol{ + font-size:72px; + color:black; + position:relative; + top:-32px; +} +.player .rank{ + font-size:128px; + color:black; +} +.player .rankTotal{ + font-size:72px; + color:black; +} +.player .points{ + font-size:48px; + color:black; +} +.prevRank{ + padding-top:24px; + font-size:48px; + color:black; + text-align:center; +} +.nextRank{ + padding-bottom:24px; + font-size:48px; + color:black; + text-align:center; +} +.prevRank .points,.nextRank .points,.prevRank .rank,.nextRank .rank,.prevRank .rankSymbol,.nextRank .rankSymbol{ + font-size:42px; + color:#666666; +} +#tracker{ + border-radius:36px; + background-image:linear-gradient(#e6f2ff, #e6e6ff,#ffe6e6); +} \ No newline at end of file diff --git a/tracker.html b/tracker.html new file mode 100644 index 0000000..eff926c --- /dev/null +++ b/tracker.html @@ -0,0 +1,14 @@ + + + ITL Rank Tracker + + + +
+
+
+
+
+ + + \ No newline at end of file diff --git a/tracker.js b/tracker.js new file mode 100644 index 0000000..9601726 --- /dev/null +++ b/tracker.js @@ -0,0 +1,39 @@ +console.log("Hello World!"); +var targetPlayer="sigonasr2"; +var prevRankData; +var currentPlayerData; +var nextRankData; +function DisplayPlayerInfo(pl,showTotal=false){ + return "
#"+pl.position+""+ + (showTotal?"/"+pl.leaderboardSize+"":"")+` + `+pl.name+` + `+pl.rankingPoints+" pts
"; +} +function GetData(){ + fetch("http://projectdivar.com/files/leaderboardinfo", {cache: "no-cache"}).then((resp)=>resp.json()) + .then((data)=>{ + for(i=0;i"+DisplayPlayerInfo(currentPlayerData,true)+"" + if (prevRankData){ + document.getElementById("prevRank").innerHTML="
"+DisplayPlayerInfo(prevRankData)+"
"; + }else{ + document.getElementById("prevRank").innerHTML=""; + } + if (nextRankData){ + document.getElementById("nextRank").innerHTML="
"+DisplayPlayerInfo(nextRankData)+"
"; + }else{ + document.getElementById("nextRank").innerHTML=""; + } + }) +} +GetData(); +setInterval(GetData,5000); \ No newline at end of file