2019-10-15 22:42:47 -04:00
< head >
< title > Leaderboard< / title >
< meta charset = "utf-8" >
2021-02-28 11:27:27 -05:00
< link href = "../assets/css/browser.css?v=3" text / css " rel = "stylesheet" >
2019-10-15 22:42:47 -04: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" >
2021-01-18 21:54:18 -05:00
< meta id = "meta-desc" property = "og:description" content = "View Geometry Dash's leaderboards, plus an accurate and updated list of the top players." >
2019-10-15 22:42:47 -04:00
< meta id = "meta-image" name = "og:image" itemprop = "image" content = "https://gdbrowser.com/assets/trophy.png" >
2021-01-21 20:28:04 -05:00
< meta name = "twitter:card" content = "summary" >
2019-10-15 22:42:47 -04:00
< / head >
2019-10-23 02:54:19 +03:00
< body class = "levelBG" onbeforeunload = "saveUrl()" >
2019-10-15 22:42:47 -04: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" >
2021-01-18 21:54:18 -05:00
<!-- for some GDPS'es -->
< img src = "../assets/tab-weekly-on.png" class = "sideSpaceC leaderboardTab" id = "weeklyTabOn" style = "display: none" >
< img src = "../assets/tab-weekly-off.png" class = "sideSpaceC leaderboardTab leaderboardClick" id = "weeklyTabOff" style = "display: none" >
2019-10-15 22:42:47 -04:00
< 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 20:32:15 -05:00
< div class = "fancybox bounce center supercenter" style = "width: 80vh" >
2019-10-15 22:42:47 -04: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 19:28:24 -05:00
< img class = "cornerPiece noClick" src = "../assets/corner.png" width = 7%; >
2019-10-15 22:42:47 -04:00
< / div >
< div style = "position:absolute; bottom: 0%; right: 0%; width: 100%; text-align: right;" >
2020-11-16 19:28:24 -05: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 22:42:47 -04:00
< / div >
< div id = "searchBox" class = "supercenter dragscroll" >
< div style = "height: 4.5%" > < / div >
< / div >
2020-03-21 18:45:49 -04:00
< div class = "leaderboardBox supercenter gs" style = "width: 120vh; height: 80%; pointer-events: none" >
2020-12-01 00:07:10 -05: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%" >
2021-02-28 11:27:27 -05:00
< img class = "gdButton" id = "weeklyStats" style = "margin-bottom: 1vh" title = "Weekly Stats" src = "../assets/sort-week.png" height = "11%" >
2020-12-01 00:07:10 -05:00
< / div >
2021-02-28 11:27:27 -05:00
< div class = "sortDiv" style = "position: relative; right: 10.5%; top: 0%; width: 0.1%; transform: translateY(-33.3%)" >
2020-12-01 00:07:10 -05:00
< 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 18:45:49 -04:00
< / div >
< / div >
2019-10-15 22:42:47 -04: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 08:20:25 -07: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 >
2021-01-18 21:54:18 -05:00
< script type = "text/javascript" src = "../sizecheck.js?" > < / script >
2021-01-04 10:21:58 -05:00
< script type = "text/javascript" src = "../dragscroll.js" > < / script >
2019-10-15 22:42:47 -04:00
< script >
2020-03-21 18:45:49 -04:00
let sort = "stars"
2020-12-01 00:07:10 -05:00
let modMode = false
2021-01-18 21:54:18 -05:00
let weekly = false
2021-02-28 11:27:27 -05:00
let showWeek = localStorage.weeklyStats == "1"
2020-11-13 22:32:46 -05:00
let trophies = [1, 3, 10, 25, 50, 75, 100]
2021-01-18 21:54:18 -05:00
let boomColors = ["red", "orange", "yellow", "green", "teal", "blue", "pink"]
2019-10-15 22:42:47 -04:00
let top250Text =
2021-02-03 13:50:19 -05:00
`The < cg > Stars< / cg > leaderboard contains the < cg > top 250 players< / cg > , sorted by < cy > star< / cy > value. However, due to < co > hackers< / co > flooding the leaderboard, this leaderboard has been < cb > frozen< / cb > for well over 2 years and displays < co > very outdated information< / co > .`
2021-01-18 21:54:18 -05:00
let topGDPSText =
2021-02-03 13:50:19 -05:00
`The < cg > Stars< / cg > leaderboard contains the < cg > top players< / cg > , sorted by < cy > star< / cy > value. It is < co > inaccurate< / co > in vanilla GD but should be < cb > reliable< / cb > on most < cy > private servers< / cy > .`
2021-01-18 21:54:18 -05:00
let weeklyText =
2021-02-03 13:50:19 -05:00
`The < cg > Weekly< / cg > leaderboard displays the players who have gained the most < cy > stars< / cy > in the < cb > past week< / cb > . It was officially < co > removed< / co > in update 2.0, but lives on in some GDPS'es.`
2019-10-15 22:42:47 -04:00
let accurateText =
2021-02-03 13:50:19 -05:00
`The < cg > Accurate Leaderboard< / cg > is a highly accurate, hacker-proof leaderboard with < cy > proper stats and positioning< / cy > (unlike the regular one). It is managed by < cb > XShadowWizardX, Pepper360, Octeract< / cb > , and many many other helpers. Be sure to check out their < a target = "_blank" href = "https://docs.google.com/spreadsheets/d/10lbPnDYJXhbtlA0ls0cGjjX_osFSG559IDrTbhgPHvc" > < ca class = "underline" > interactive leaderboard spreadsheet< / ca > < / a > or join their < a target = "_blank" href = "https://discord.gg/Uz7pd4d" > < ca class = "underline" > Discord server< ca > < / a > .`
2019-10-15 22:42:47 -04:00
let creatorText =
2021-02-03 13:50:19 -05:00
`The < cg > Creators Leaderboard< / cg > is sorted by < cg > creator points< / cg > , rather than stars. A player's < cg > creator points< / cg > (CP) is calculated by counting their number of < cy > star rated< / cy > levels, plus an extra point for every level that has been < cb > featured< / cb > , plus an additional point for < co > epic rated< / co > levels.`
2019-10-15 22:42:47 -04:00
2021-02-28 11:27:27 -05:00
if (showWeek) $('#weeklyStats').attr('src', '../assets/sort-week-on.png')
2021-02-03 13:50:19 -05:00
function infoText(text) { $('#infoText').html(text) }
2019-10-15 22:42:47 -04:00
infoText(accurateText)
2019-11-19 23:53:24 -05:00
function leaderboard(val) {
2019-10-15 22:42:47 -04:00
$('#searchBox').html(`< div style = "height: 4.5%" > < / div > `)
$('#loading').show()
2021-01-18 21:54:18 -05:00
Fetch(`../api/leaderboard?count=250& ${val}& type=${sort}${modMode ? "& mod=1" : ""}`).then(res => {
if (gdps) {
top250Text = topGDPSText
$('#boomling').remove()
}
2019-10-15 22:42:47 -04:00
2021-01-18 21:54:18 -05:00
if (gdps & & type == "accurate" & & (res == "-2" || res == "-3")) { // for GDPS'es
2021-01-15 10:29:46 -05:00
$('#accurateTabOn').remove()
$('#accurateTabOff').remove()
2021-01-18 21:54:18 -05:00
if (res == "-3") { $('#weeklyTabOff').show(); weekly = true }
else $('#scoreTabs').css('margin-left', '-29vh')
2021-01-15 10:29:46 -05:00
return $('#topTabOff').trigger('click')
}
2019-11-19 23:53:24 -05:00
$('#searchBox').html(`< div style = "height: 4.5%" > < / div > `)
2019-11-17 17:00:19 -05:00
$('.ranking').remove()
2020-12-01 00:07:10 -05:00
if (modMode & & sort == "cp") res = res.sort(function(a, b){return b.cp - a.cp});
2021-01-18 21:54:18 -05:00
let wk = type == "weekly"
2020-12-01 00:07:10 -05:00
2021-01-18 21:54:18 -05:00
if (val == type & & res != -1 & & res.length) res.forEach((x, y) => {
2019-10-15 22:42:47 -04:00
2021-02-28 11:27:27 -05:00
let wp = x.weeklyProgress || {}
2021-04-02 21:24:42 -04:00
let cosmetics = x.cosmetics || {}
let bgCol = cosmetics.bgColor
let bgString = bgCol ? ` style="background-color: rgb(${bgCol.join()})"` : ""
let nameCol = cosmetics.nameColor
let nameString = nameCol ? `; color: rgb(${nameCol.join()}) ;` : null
$('#searchBox').append(`< div class = "searchresult leaderboardSlot" $ { bgString } >
2021-04-03 19:08:43 -04:00
${x.moderator ? `< img title = "${x.moderator == 2 ? " Elder " : " " } Moderator " src = "../assets/mod${x.moderator == 2 ? " -elder " : " " } . png " style = "height: 25%; cursor: help; padding-right: 1.6%; transform: translateY(0.7vh)" > ` : ""}
2021-04-02 21:24:42 -04:00
< h2 class = "small inline gdButton" style = "margin-top: 1.5%${nameString || (x.moderator == 2 ? " ; color: # FF9977 ; " : " " ) } " > < a href = "${onePointNine ? `../search/${x.playerID}?user` : `../u/${x.accountID}.`}" > ${x.username}< / a > < / h2 >
2021-01-25 09:27:57 -05:00
< h3 class = "inline sideSpace${x.stars >= 100000 ? " yellow " : " " } " style = "font-size: 4.5vh${type == " weekly " ? " ; display: none " : " " } ; " > ${x.stars} < img class = "help valign" src = "../assets/star.png"
2021-02-28 11:27:27 -05:00
style="width: 4vh; transform: translate(-25%, -10%);" title="Stars">< / h3 >
2021-04-02 21:24:42 -04:00
2019-10-15 22:42:47 -04:00
< h3 class = "lessSpaced leaderboardStats" >
2021-01-25 09:27:57 -05:00
${type != "weekly" ? "" : `< span $ { x . stars > = 1000 ? " class='yellow'" : ""}>+${x.stars}< / span > < img class = "help valign" src = "../assets/star.png" title = "Star Gain" > `}
2021-01-25 00:01:38 -05:00
${wk || onePointNine ? "" : `< span $ { x . diamonds > = 65535 ? ` class='blue'>${type == "accurate" ? "~" : ""}` : ">"}${x.diamonds}< / span > < img class = "help valign" src = "../assets/diamond.png" title = "Diamonds" > `}
${wk ? " " : `< span $ { x . coins > = 149 ? " class='yellow'" : ""}>${x.coins}< / span > < img class = "help valign" src = "../assets/coin.png" title = "Secret Coins" > `}
${wk || onePointNine ? "" : `< span $ { x . usercoins > = 10000 ? " class='brightblue'" : ""}>${x.usercoins}< / span > < img class = "help valign" src = "../assets/silvercoin.png" title = "User Coins" > `}
${wk ? "" : `< span $ { x . demons > = 1000 ? " class='brightred'" : ""}>${x.demons}< / span > < img class = "help valign" src = "../assets/demon.png" title = "Demons" > `}
${x.cp < = 0 ? "" : `< span $ { x . cp > = 100 ? " class='yellow'" : ""}>${x.cp}< / span > < img class = "help valign" src = "../assets/cp.png" title = "Creator Points" > `}
2019-10-15 22:42:47 -04:00
< / h3 >
2020-11-12 20:32:15 -05:00
2021-02-28 11:27:27 -05:00
< h3 class = "lessSpaced leaderboardStats weeklyStuff" } >
< span $ { wp . diamonds > = 250 ? " class='blue'" : ""}>${wp.diamonds >= 0 ? "+" : ""}${wp.diamonds}< / span > < img class = "help valign" src = "../assets/diamond.png" title = "Diamond Gain" >
< span $ { wp . stars > = 1000 ? " class='yellow'" : ""}>${wp.stars >= 0 ? "+" : ""}${wp.stars}< / span > < img class = "help valign" src = "../assets/star.png" title = "Star Gain" >
< span $ { wp . usercoins > = 250 ? " class='brightblue'" : ""}>${wp.usercoins >= 0 ? "+" : ""}${wp.usercoins}< / span > < img class = "help valign" src = "../assets/silvercoin.png" title = "User Coin Gain" >
< span $ { wp . demons > = 25 ? " class='brightred'" : ""}>${wp.demons >= 0 ? "+" : ""}${wp.demons}< / span > < img class = "help valign" src = "../assets/demon.png" title = "Demon Gain" >
< / h3 >
< div class = "center ranking" >
${x.icon.icon == -1 & & type == "accurate" ? `< img class = "spaced" src = "./assets/trophies/${trophies.findIndex(z => y+1 <= z) + 1}.png" height = "150%" style = "margin-bottom: 0%; transform:scale(1.1)" > ` :
2020-11-12 20:32:15 -05: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 00:07:10 -05:00
< h2 class = "small" style = "margin-top: 2%" > ${y+1}< / h2 >
2019-10-15 22:42:47 -04:00
< / div >
< / div > `)
})
2020-11-13 22:32:46 -05: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 >
2021-02-03 13:50:19 -05:00
< p class = "center" style = "padding: 0% 10%" > Due to RobTop's new < cy > API enforcements< / cy > , the Accurate Leaderboard is < ca > no longer able to load reliably< / ca > . A fix is being worked on and will hopefully be released in < cg > a day or two< / cg > .< / p >
2020-11-13 22:32:46 -05:00
< / div > `)
} */
2020-11-12 20:32:15 -05:00
2021-02-28 11:27:27 -05:00
weeklyAdjust()
2019-10-15 22:42:47 -04:00
$('#searchBox').append('< div style = "height: 4.5%" > < / div > ')
$('#loading').hide();
2020-10-28 21:25:13 -04:00
$('.lazyLoad').Lazy({ appendScroll: '#searchBox' });
2021-04-22 18:23:31 -04:00
}).catch(e => {console.log(e); $('#loading').hide();})
2019-10-15 22:42:47 -04:00
}
2021-01-18 21:54:18 -05:00
let type = "accurate"
leaderboard(type)
2020-11-16 19:28:24 -05:00
2021-01-18 21:54:18 -05:00
$('#boomling').attr('src', `../assets/boomlings/${boomColors[Math.floor(Math.random() * boomColors.length)]}.png`)
2020-03-21 18:45:49 -04:00
2021-01-18 21:54:18 -05: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")
2019-10-15 22:42:47 -04:00
})
2021-01-18 21:54:18 -05:00
return leaderboard("accurate")
})
2019-10-15 22:42:47 -04:00
2021-01-18 21:54:18 -05:00
$('#topTabOff').click(function() {
if (type == "top") return;
type = "top"
leaderboard(type)
$('.leaderboardTab').hide();
$('#topTabOn').show()
$(weekly ? '#weeklyTabOff' : '#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()
})
$('#weeklyTabOff').click(function() {
if (type == "weekly" || !gdps) return;
type = "weekly"
leaderboard(type)
$('.leaderboardTab').hide();
$('#topTabOff').show()
$('#weeklyTabOn').show()
$('#creatorTabOff').show()
infoText(weeklyText)
$('.sortDiv').hide()
})
$('#creatorTabOff').click(function() {
if (type == "creator") return;
type = "creator"
leaderboard(type)
$('.leaderboardTab').hide();
$('#topTabOff').show()
$(weekly ? '#weeklyTabOff' : '#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)
})
2020-12-01 00:07:10 -05:00
2021-02-28 11:27:27 -05:00
function weeklyAdjust() {
let weekEnabled = showWeek & & type == "accurate"
$('.leaderboardSlot').css('height', weekEnabled ? '33%' : '25%')
$('.weeklyStuff').css('display', weekEnabled ? 'block' : 'none')
$('.ranking').css('transform', `scale(0.82) translate(-20.7vh, -${weekEnabled ? 24 : 20}vh)`)
}
$('#weeklyStats').click(function() {
showWeek = !showWeek
localStorage.weeklyStats = showWeek + 0
$(this).attr('src', `../assets/sort-week${showWeek ? "-on" : ""}.png`)
weeklyAdjust()
})
2019-10-15 22:42:47 -04:00
< / script >