2019-10-15 23:42:47 -03:00
< head >
< title > Leaderboard< / title >
< meta charset = "utf-8" >
2019-10-23 19:40:31 -03:00
< link href = "../css/browser.css" type = "text/css" rel = "stylesheet" >
2019-10-15 23:42:47 -03:00
< 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 >
2019-10-22 20:54:19 -03:00
< body class = "levelBG" onbeforeunload = "saveUrl()" >
2019-10-15 23:42:47 -03:00
< 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" >
2020-11-12 22:32:15 -03:00
< div class = "fancybox bounce center supercenter" style = "width: 80vh" >
2019-10-15 23:42:47 -03:00
< 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%" >
2020-11-16 21:28:24 -03:00
< img class = "cornerPiece noClick" src = "../assets/corner.png" width = 7%; >
2019-10-15 23:42:47 -03:00
< / div >
< div style = "position:absolute; bottom: 0%; right: 0%; width: 100%; text-align: right;" >
2020-11-16 21:28:24 -03:00
< 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)" >
2019-10-15 23:42:47 -03:00
< / div >
< div id = "searchBox" class = "supercenter dragscroll" >
< div style = "height: 4.5%" > < / div >
< / div >
2020-03-21 19:45:49 -03:00
< div class = "leaderboardBox supercenter gs" style = "width: 120vh; height: 80%; pointer-events: none" >
2020-12-01 02:07:10 -03:00
< 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" >
2020-03-21 19:45:49 -03:00
< / div >
< / div >
2019-10-15 23:42:47 -03:00
< 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 >
2019-10-21 12:20:25 -03:00
< 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 >
2019-10-24 23:27:09 -03:00
< script type = "text/javascript" src = "../assets/dragscroll.js" > < / script >
2019-10-15 23:42:47 -03:00
< script >
2020-03-21 19:45:49 -03:00
let sort = "stars"
2020-11-14 18:14:29 -03:00
let useTrophies = false
2020-12-01 02:07:10 -03:00
let modMode = false
2020-11-14 00:32:46 -03:00
let trophies = [1, 3, 10, 25, 50, 75, 100]
2020-11-16 21:28:24 -03:00
let colors = ["red", "orange", "yellow", "green", "teal", "blue", "pink"]
2019-10-15 23:42:47 -03:00
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 =
2020-11-12 22:32:15 -03:00
`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 > .`
2019-10-15 23:42:47 -03:00
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
2019-10-26 00:08:54 -03:00
.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 > ')
2019-10-15 23:42:47 -03:00
$('#infoText').html(tweaked)
}
infoText(accurateText)
2019-11-20 01:53:24 -03:00
function leaderboard(val) {
2019-10-15 23:42:47 -03:00
$('#searchBox').html(`< div style = "height: 4.5%" > < / div > `)
$('#loading').show()
2020-12-01 02:07:10 -03:00
fetch(`../api/leaderboard?count=250& ${val}& type=${sort}${modMode ? "& mod=1" : ""}`).then(res => res.json()).then(res => {
2019-10-15 23:42:47 -03:00
2019-11-20 01:53:24 -03:00
$('#searchBox').html(`< div style = "height: 4.5%" > < / div > `)
2019-11-17 19:00:19 -03:00
$('.ranking').remove()
2020-12-01 02:07:10 -03:00
if (modMode & & sort == "cp") res = res.sort(function(a, b){return b.cp - a.cp});
2020-11-12 22:32:15 -03:00
if (val == type & & res != -1 & & res.length) res.forEach((x, y) => {
2019-10-15 23:42:47 -03:00
$('#searchBox').append(`< div class = "searchresult leaderboardSlot" >
2020-12-01 02:07:10 -03:00
${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 >
2020-09-10 10:02:40 -03:00
< h3 class = "inline sideSpace${x.stars >= 100000 ? " yellow " : " " } " style = "font-size: 4.5vh" > ${x.stars} < img class = "valign" src = "../assets/star.png"
2019-10-15 23:42:47 -03:00
style="cursor: help; height: 19%; transform: translate(-25%, -10%);" title="Stars">< / h3 >
< h3 class = "lessSpaced leaderboardStats" >
2020-11-14 00:32:46 -03:00
< span $ { x . diamonds > = 65535 ? " class='blue'>~" : ">"}${x.diamonds}< / span > < img class = "valign" src = "../assets/diamond.png" style = "cursor: help" title = "Diamonds" >
2020-04-23 00:56:19 -04:00
< span $ { x . coins > = 149 ? " class='yellow'" : ""}>${x.coins}< / span > < img class = "valign" src = "../assets/coin.png" style = "cursor: help" title = "Secret Coins" >
2020-11-14 00:32:46 -03:00
< 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" > ` : ""}
2019-10-15 23:42:47 -03:00
< / h3 >
2020-10-02 15:33:24 -03:00
< div class = "center ranking" style = "position:absolute; transform:scale(0.82) translate(-20.7vh, -20vh); height: 10%; width: 12.5%;" >
2020-11-12 22:32:15 -03:00
2020-12-01 02:07:10 -03:00
${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)" > ` :
2020-11-12 22:32:15 -03:00
`< 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)" > `}
2020-12-01 02:07:10 -03:00
< h2 class = "small" style = "margin-top: 2%" > ${y+1}< / h2 >
2019-10-15 23:42:47 -03:00
< / div >
< / div > `)
})
2020-11-14 00:32:46 -03:00
/* 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 > `)
} */
2020-11-12 22:32:15 -03:00
2019-10-15 23:42:47 -03:00
$('#searchBox').append('< div style = "height: 4.5%" > < / div > ')
$('#loading').hide();
2020-10-28 22:25:13 -03:00
$('.lazyLoad').Lazy({ appendScroll: '#searchBox' });
2019-10-15 23:42:47 -03:00
})
}
let type = "accurate"
2019-11-20 01:53:24 -03:00
leaderboard(type)
2019-10-15 23:42:47 -03:00
2020-11-16 21:28:24 -03:00
$('#boomling').attr('src', `../assets/boomlings/${colors[Math.floor(Math.random() * colors.length)]}.png`)
2020-03-21 19:45:49 -03:00
$(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")
})
2019-10-15 23:42:47 -03:00
$('#topTabOff').click(function() {
2019-11-17 19:00:19 -03:00
if (type == "top") return;
2019-10-15 23:42:47 -03:00
type = "top"
2019-11-20 01:53:24 -03:00
leaderboard(type)
2019-10-15 23:42:47 -03:00
$('.leaderboardTab').hide();
$('#topTabOn').show()
$('#accurateTabOff').show()
$('#creatorTabOff').show()
infoText(top250Text)
2020-12-01 02:07:10 -03:00
$('.sortDiv').hide()
2019-10-15 23:42:47 -03:00
})
$('#accurateTabOff').click(function() {
2019-11-17 19:00:19 -03:00
if (type == "accurate") return;
2019-10-15 23:42:47 -03:00
type = "accurate"
2019-11-20 01:53:24 -03:00
leaderboard(type)
2019-10-15 23:42:47 -03:00
$('.leaderboardTab').hide();
$('#topTabOff').show()
$('#accurateTabOn').show()
$('#creatorTabOff').show()
infoText(accurateText)
2020-12-01 02:07:10 -03:00
$('.sortDiv').show()
2019-10-15 23:42:47 -03:00
})
$('#creatorTabOff').click(function() {
2019-11-17 19:00:19 -03:00
if (type == "creator") return;
2019-10-15 23:42:47 -03:00
type = "creator"
2019-11-20 01:53:24 -03:00
leaderboard(type)
2019-10-15 23:42:47 -03:00
$('.leaderboardTab').hide();
$('#topTabOff').show()
$('#accurateTabOff').show()
$('#creatorTabOn').show()
infoText(creatorText)
2020-12-01 02:07:10 -03:00
$('.sortDiv').hide()
2019-10-22 20:54:19 -03:00
});
2020-12-01 02:07:10 -03:00
$('#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)
})
2019-10-15 23:42:47 -03:00
< / script >