Added GDPS Discord links to leaderboard
This commit is contained in:
parent
571baaf0d8
commit
a941279399
2 changed files with 12 additions and 4 deletions
|
@ -72,7 +72,7 @@
|
||||||
<img class="gdButton" src="../assets/smallinfo.png" width="32%" onclick="$('#infoDiv').show()">
|
<img class="gdButton" src="../assets/smallinfo.png" width="32%" onclick="$('#infoDiv').show()">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position:absolute; top: 12%; right: 1.5%; width: 21%; text-align: right;">
|
<div id="discordLinks" style="display: none; position:absolute; top: 12%; right: 1.5%; width: 21%; text-align: right;">
|
||||||
<a id="discord" target="_blank" title="Official leaderboard Discord!" href="https://discord.gg/leaderboard"><img class="gdButton" src="../assets/discord.png" width="20%"></a>
|
<a id="discord" target="_blank" title="Official leaderboard Discord!" href="https://discord.gg/leaderboard"><img class="gdButton" src="../assets/discord.png" width="20%"></a>
|
||||||
<a id="altDiscord" target="_blank" title="Accurate leaderboard Discord!" style="display: none; filter: hue-rotate(300deg)" href="https://discord.gg/Uz7pd4"><img class="gdButton" src="../assets/discord.png" width="20%"></a>
|
<a id="altDiscord" target="_blank" title="Accurate leaderboard Discord!" style="display: none; filter: hue-rotate(300deg)" href="https://discord.gg/Uz7pd4"><img class="gdButton" src="../assets/discord.png" width="20%"></a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -139,9 +139,17 @@ function leaderboard(val) {
|
||||||
if (weekly) return
|
if (weekly) return
|
||||||
else if (ps.weeklyLeaderboard) { $('#weeklyTabOff').show(); weekly = true }
|
else if (ps.weeklyLeaderboard) { $('#weeklyTabOff').show(); weekly = true }
|
||||||
else $('#scoreTabs').css('margin-left', '-29vh')
|
else $('#scoreTabs').css('margin-left', '-29vh')
|
||||||
|
|
||||||
|
if (ps.link.includes("https://discord.gg")) {
|
||||||
|
$('#discord').attr('href', ps.link).attr('title', `${ps.name} Discord!`)
|
||||||
|
$('#discordLinks').show()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else $('#boomling').show()
|
else {
|
||||||
|
$('#boomling').show()
|
||||||
|
$('#discordLinks').show()
|
||||||
|
}
|
||||||
|
|
||||||
$('#searchBox').html(`<div style="height: 4.5%"></div>`)
|
$('#searchBox').html(`<div style="height: 4.5%"></div>`)
|
||||||
$('.ranking').remove()
|
$('.ranking').remove()
|
||||||
|
|
|
@ -167,7 +167,7 @@ function Append(firstLoad, noCache) {
|
||||||
else $('#lastPage').removeClass('grayscale').find('img').addClass('gdButton')
|
else $('#lastPage').removeClass('grayscale').find('img').addClass('gdButton')
|
||||||
|
|
||||||
if (!noCache && pageCache[page]) appendLevels(pageCache[page])
|
if (!noCache && pageCache[page]) appendLevels(pageCache[page])
|
||||||
else Fetch(searchFilters.replace("[PAGE]", page)).then(appendLevels)
|
else Fetch(searchFilters.replace("[PAGE]", page)).then(appendLevels).catch(e => $('#loading').hide())
|
||||||
|
|
||||||
function appendLevels(res) {
|
function appendLevels(res) {
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ function Append(firstLoad, noCache) {
|
||||||
else $('#shuffle').css('filter', 'hue-rotate(100deg)')
|
else $('#shuffle').css('filter', 'hue-rotate(100deg)')
|
||||||
}
|
}
|
||||||
$('#shuffle').show()
|
$('#shuffle').show()
|
||||||
$('#lastPage').show()
|
if (pages > 1) $('#lastPage').show()
|
||||||
$('#pagenum').text(`Page ${page + 1}${pages ? ` of ${pages}` : ""}`)
|
$('#pagenum').text(`Page ${page + 1}${pages ? ` of ${pages}` : ""}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue