44c98330c3
8=8
218 lines
No EOL
11 KiB
HTML
218 lines
No EOL
11 KiB
HTML
<head>
|
|
<title>Leaderboard</title>
|
|
<meta charset="utf-8">
|
|
<link href="../css/browser.css" type="text/css" rel="stylesheet">
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-135255146-3"></script><script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-135255146-3');</script>
|
|
<link rel="icon" href="../assets/trophy.png">
|
|
<meta id="meta-title" property="og:title" content="Leaderboards">
|
|
<meta id="meta-desc" property="og:description" content="View Geometry Dash's leaderboards, plus an accurate and updated list of the top 100 players.">
|
|
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/trophy.png">
|
|
</head>
|
|
|
|
<body class="levelBG" onbeforeunload="saveUrl()">
|
|
|
|
<div id="everything" style="overflow: auto;">
|
|
|
|
<div id="scoreTabs">
|
|
<img src="../assets/tab-top-on.png" class="leaderboardTab" id="topTabOn" style="display: none">
|
|
<img src="../assets/tab-top-off.png" class="leaderboardTab leaderboardClick" id="topTabOff">
|
|
|
|
<img src="../assets/tab-accurate-on.png" class="sideSpaceC leaderboardTab" id="accurateTabOn">
|
|
<img src="../assets/tab-accurate-off.png" class="sideSpaceC leaderboardTab leaderboardClick" id="accurateTabOff" style="display: none">
|
|
|
|
<img src="../assets/tab-creators-on.png" class="sideSpaceC leaderboardTab" id="creatorTabOn" style="display: none">
|
|
<img src="../assets/tab-creators-off.png" class="sideSpaceC leaderboardTab leaderboardClick" id="creatorTabOff">
|
|
</div>
|
|
|
|
<div class="popup" id="infoDiv">
|
|
<div class="fancybox bounce center supercenter" style="width: 80vh">
|
|
<h2 class="smaller center" style="font-size: 5.5vh">Leaderboard Info</h2>
|
|
<p class="bigger center" id="infoText" style="line-height: 5vh; margin-top: 1.5vh"></p>
|
|
<img src="../assets/ok.png" width=20%; class="gdButton center" onclick="$('.popup').hide()">
|
|
</div>
|
|
</div>
|
|
|
|
<div style="position:absolute; bottom: 0%; left: 0%; width: 100%">
|
|
<img class="cornerPiece noClick" src="../assets/corner.png" width=7%;>
|
|
</div>
|
|
|
|
<div style="position:absolute; bottom: 0%; right: 0%; width: 100%; text-align: right;">
|
|
<a title="Boomlings Leaderboard?????" href="../boomlings"><img id="boomling" style="position: absolute; width: 6%; top: 2%; right: 1%"></a>
|
|
<img class="cornerPiece noClick" src="../assets/corner.png" width=7%; style="transform: scaleX(-1)">
|
|
</div>
|
|
|
|
<div id="searchBox" class="supercenter dragscroll">
|
|
<div style="height: 4.5%"></div>
|
|
</div>
|
|
|
|
<div class="leaderboardBox supercenter gs" style="width: 120vh; height: 80%; pointer-events: none">
|
|
<div class="sortDiv" style="position: relative; left: 100%; transform: translateX(4.5vh); top: 12%; width: 0.1%">
|
|
<img class="gdButton" id="modSort" style="margin-bottom: 1vh" title="Moderators" src="../assets/sort-mod.png" height="11%">
|
|
</div>
|
|
<div class="sortDiv" style="position: relative; right: 10.5%; top: 0%; width: 0.1%">
|
|
<img class="gdButton sortButton" style="margin-bottom: 1vh" sort="stars" title="Most stars" src="../assets/sort-stars-on.png" height="11%" id="starSort">
|
|
<img class="gdButton sortButton" style="margin-bottom: 1vh" sort="coins" title="Most coins" src="../assets/sort-coins.png" height="11%">
|
|
<img class="gdButton sortButton" style="margin-bottom: 1vh" sort="demons" title="Most demons" src="../assets/sort-demons.png" height="11%">
|
|
<img class="gdButton sortButton" style="margin-bottom: 1vh; display: none" sort="cp" title="Most creator points" src="../assets/sort-cp.png" height="11%" id="cpSort">
|
|
</div>
|
|
</div>
|
|
|
|
<div style="position:absolute; top: 2%; left: 1.5%; width: 10%; height: 25%; pointer-events: none">
|
|
<img class="gdButton yesClick" id="backButton" src="../assets/back.png" height="30%" onclick="backButton()">
|
|
</div>
|
|
|
|
<div style="position:absolute; top: 2.5%; right: 2%; width: 10%; text-align: right;">
|
|
<img class="gdButton" src="../assets/smallinfo.png" width="32%" onclick="$('#infoDiv').show()">
|
|
</div>
|
|
|
|
<div class="supercenter" id="loading" style="height: 10%; top: 47%; display: none;">
|
|
<img class="spin noSelect" src="../assets/loading.png" height="105%">
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.9/jquery.lazy.min.js"></script>
|
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.9/jquery.lazy.plugins.min.js"></script>
|
|
<script async type="text/javascript" src="../assets/sizecheck.js"></script>
|
|
<script type="text/javascript" src="../assets/dragscroll.js"></script>
|
|
<script>
|
|
|
|
let sort = "stars"
|
|
let useTrophies = false
|
|
let modMode = false
|
|
let trophies = [1, 3, 10, 25, 50, 75, 100]
|
|
let colors = ["red", "orange", "yellow", "green", "teal", "blue", "pink"]
|
|
|
|
let top250Text =
|
|
`The <g>Top 250<> leaderboard contains the <g>top 250 players<>, sorted by <y>star<> value. However, due to <o>hackers<> flooding the leaderboard, this leaderboard has been <b>frozen<> for well over 2 years and displays <o>very outdated information<>.`
|
|
|
|
let accurateText =
|
|
`The <g>Accurate Leaderboard<> is a highly accurate, hacker-proof leaderboard with <y>proper stats and positioning<> (unlike the regular one). It is managed by <b>XShadowWizardX, Pepper360, Octeract<>, and many many other helpers. Be sure to check out their <a target="_blank" href="https://docs.google.com/spreadsheets/d/10lbPnDYJXhbtlA0ls0cGjjX_osFSG559IDrTbhgPHvc"><span style="color:aqua; text-decoration: underline">interactive leaderboard spreadsheet<></a> or join their <a target="_blank" href="https://discord.gg/Uz7pd4d"><span style="color:aqua; text-decoration: underline">Discord server<></a>.`
|
|
|
|
let creatorText =
|
|
`The <g>Creators Leaderboard<> is sorted by <g>creator points<>, rather than stars. A player's <g>creator points<> (CP) is calculated by counting their number of <y>star rated<> levels, plus an extra point for every level that has been <b>featured<>, plus an additional point for <o>epic rated<> levels.`
|
|
|
|
function infoText(text) {
|
|
let tweaked = text
|
|
.replace(/<g>/g, '<span style="color:#4CDA5B">')
|
|
.replace(/<b>/g, '<span style="color:#60ABEF">')
|
|
.replace(/<y>/g, '<span style="color:yellow">')
|
|
.replace(/<o>/g, '<span style="color:orange">')
|
|
.replace(/<>/g, '</span>')
|
|
$('#infoText').html(tweaked)
|
|
}
|
|
|
|
infoText(accurateText)
|
|
|
|
function leaderboard(val) {
|
|
|
|
$('#searchBox').html(`<div style="height: 4.5%"></div>`)
|
|
$('#loading').show()
|
|
|
|
fetch(`../api/leaderboard?count=250&${val}&type=${sort}${modMode ? "&mod=1" : ""}`).then(res => res.json()).then(res => {
|
|
|
|
$('#searchBox').html(`<div style="height: 4.5%"></div>`)
|
|
$('.ranking').remove()
|
|
|
|
if (modMode && sort == "cp") res = res.sort(function(a, b){return b.cp - a.cp});
|
|
|
|
if (val == type && res != -1 && res.length) res.forEach((x, y) => {
|
|
|
|
$('#searchBox').append(`<div class="searchresult leaderboardSlot">
|
|
${x.moderator ? `<img title="${x.moderator == 2 ? "Elder " : ""}Moderator" src="../assets/mod${x.moderator == 2 ? "-elder" : ""}.png" style="height: 30%; cursor: help; padding-right: 1.6%; transform: translateY(0.7vh)">` : ""}
|
|
<h2 class="small inline gdButton" style="margin-top: 1.5%${x.moderator == 2 ? "; color: #FF9977;" : ""}"><a href="../u/${x.username}">${x.username}</a></h2>
|
|
<h3 class="inline sideSpace${x.stars >= 100000 ? " yellow" : ""}" style="font-size: 4.5vh">${x.stars} <img class="valign" src="../assets/star.png"
|
|
style="cursor: help; height: 19%; transform: translate(-25%, -10%);" title="Stars"></h3>
|
|
|
|
<h3 class="lessSpaced leaderboardStats">
|
|
<span${x.diamonds >= 65535 ? " class='blue'>~" : ">"}${x.diamonds}</span> <img class="valign" src="../assets/diamond.png" style="cursor: help" title="Diamonds">
|
|
<span${x.coins >= 149 ? " class='yellow'" : ""}>${x.coins}</span> <img class="valign" src="../assets/coin.png" style="cursor: help" title="Secret Coins">
|
|
<span${x.usercoins >= 10000 ? " class='brightblue'" : ""}>${x.usercoins}</span> <img class="valign" src="../assets/silvercoin.png" style="cursor: help" title="User Coins">
|
|
<span${x.demons >= 1000 ? " class='brightred'" : ""}>${x.demons}</span> <img class="valign" src="../assets/demon.png" style="cursor: help" title="Demons">
|
|
${x.cp != 0 ? `<span${x.cp >= 100 ? " class='yellow'" : ""}>${x.cp}</span> <img class="valign" src="../assets/cp.png" style="cursor: help" title="Creator Points">` : ""}
|
|
</h3>
|
|
|
|
<div class="center ranking" style="position:absolute; transform:scale(0.82) translate(-20.7vh, -20vh); height: 10%; width: 12.5%;">
|
|
|
|
${useTrophies && type == "accurate" ? `<img class="spaced" src="./trophies/${trophies.findIndex(z => y+1 <= z) + 1}.png" height="150%" style="margin-bottom: 0%; transform:scale(1.1)">` :
|
|
`<img class="spaced lazyLoad" data-src="./icon/icon?form=${x.icon.form}&icon=${x.icon.icon}&col1=${x.icon.col1}&col2=${x.icon.col2}&glow=${x.icon.glow}&size=auto" height="150%" style="margin-bottom: 0%; transform:scale(1.1)">`}
|
|
|
|
<h2 class="small" style="margin-top: 2%">${y+1}</h2>
|
|
</div>
|
|
</div>`)
|
|
})
|
|
|
|
/* else if (type == "accurate") {
|
|
$('#searchBox').append(`<div style="width: 100%">
|
|
<h1 style="margin-top: 14%"class="center">The Accurate Leaderboard<br>is temporarily disabled</h1>
|
|
<p class="center" style="padding: 0% 10%">Due to RobTop's new <span style="color: yellow">API enforcements</span>, the Accurate Leaderboard is <span style="color: cyan">no longer able to load reliably</span>. A fix is being worked on and will hopefully be released in <span style="color: lime">a day or two</span>.</p>
|
|
</div>`)
|
|
} */
|
|
|
|
$('#searchBox').append('<div style="height: 4.5%"></div>')
|
|
$('#loading').hide();
|
|
$('.lazyLoad').Lazy({ appendScroll: '#searchBox' });
|
|
})
|
|
}
|
|
|
|
let type = "accurate"
|
|
leaderboard(type)
|
|
|
|
$('#boomling').attr('src', `../assets/boomlings/${colors[Math.floor(Math.random() * colors.length)]}.png`)
|
|
|
|
$(document).on('click', '.sortButton', function () {
|
|
if ($('#loading').is(":visible")) return
|
|
sort = $(this).attr('sort')
|
|
$('.sortButton').each(function() {
|
|
$(this).attr('src', $(this).attr('src').replace('-on', '').replace('.png', '') + ($(this).attr('sort') == sort ? "-on" : "") + ".png")
|
|
})
|
|
return leaderboard("accurate")
|
|
})
|
|
|
|
$('#topTabOff').click(function() {
|
|
if (type == "top") return;
|
|
type = "top"
|
|
leaderboard(type)
|
|
$('.leaderboardTab').hide();
|
|
$('#topTabOn').show()
|
|
$('#accurateTabOff').show()
|
|
$('#creatorTabOff').show()
|
|
infoText(top250Text)
|
|
$('.sortDiv').hide()
|
|
})
|
|
|
|
$('#accurateTabOff').click(function() {
|
|
if (type == "accurate") return;
|
|
type = "accurate"
|
|
leaderboard(type)
|
|
$('.leaderboardTab').hide();
|
|
$('#topTabOff').show()
|
|
$('#accurateTabOn').show()
|
|
$('#creatorTabOff').show()
|
|
infoText(accurateText)
|
|
$('.sortDiv').show()
|
|
})
|
|
|
|
$('#creatorTabOff').click(function() {
|
|
if (type == "creator") return;
|
|
type = "creator"
|
|
leaderboard(type)
|
|
$('.leaderboardTab').hide();
|
|
$('#topTabOff').show()
|
|
$('#accurateTabOff').show()
|
|
$('#creatorTabOn').show()
|
|
infoText(creatorText)
|
|
$('.sortDiv').hide()
|
|
});
|
|
|
|
$('#modSort').click(function() {
|
|
modMode = !modMode
|
|
$(this).attr('src', `../assets/sort-mod${modMode ? "-on" : ""}.png`)
|
|
if (modMode) { $('#cpSort').show() }
|
|
else { $('#cpSort').hide(); if (sort == "cp") $('#starSort').trigger('click') }
|
|
leaderboard(type)
|
|
})
|
|
|
|
|
|
</script> |