From 9401c2f82058805d0998f4c56120e91fddffd4d8 Mon Sep 17 00:00:00 2001 From: GDColon Date: Thu, 23 Apr 2020 00:56:19 -0400 Subject: [PATCH] =?UTF-8?q?=E3=80=90=20=EF=BB=BF~=20=EF=BD=83=EF=BD=8F?= =?UTF-8?q?=EF=BD=8C=EF=BD=8F=EF=BD=92=EF=BD=93=20~=20=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit added special color if you have >100k stars, max diamonds, or max coins --- api/accurateLeaderboard.js | 2 +- api/download.js | 1 + api/leaderboard.js | 2 +- api/level.js | 3 ++- api/profile.js | 2 +- assets/css/browser.css | 4 ++++ classes/Level.js | 2 +- html/leaderboard.html | 8 ++++---- html/profile.html | 10 +++++++--- 9 files changed, 22 insertions(+), 12 deletions(-) diff --git a/api/accurateLeaderboard.js b/api/accurateLeaderboard.js index 9c16575..19e25e9 100644 --- a/api/accurateLeaderboard.js +++ b/api/accurateLeaderboard.js @@ -36,7 +36,7 @@ module.exports = async (app, req, res) => { cp: account[8], coins: account[13], usercoins: account[17], - diamonds: account[46] == '65535' ? '65535+' : account[46], + diamonds: account[46] } leaderboard.push(accObj) diff --git a/api/download.js b/api/download.js index e4cdcd4..79b430c 100644 --- a/api/download.js +++ b/api/download.js @@ -88,6 +88,7 @@ module.exports = async (app, req, res, api, ID, analyze) => { if (level.difficulty == "Extreme Demon") { request.get('https://www.pointercrate.com/api/v1/demons/?name=' + level.name.trim(), function (err, resp, demonList) { + if (err) return sendLevel() let demon = JSON.parse(demonList) if (demon[0] && demon[0].position <= 150) level.demonList = demon[0].position return sendLevel() diff --git a/api/leaderboard.js b/api/leaderboard.js index 0be082a..3d36541 100644 --- a/api/leaderboard.js +++ b/api/leaderboard.js @@ -35,7 +35,7 @@ module.exports = async (app, req, res) => { x.cp = x[8] x.coins = x[13] x.usercoins = x[17] - x.diamonds = x[46] == '65535' ? '65535+' : x[46], + x.diamonds = x[46] keys.forEach(k => delete x[k]) }) return res.send(scores) diff --git a/api/level.js b/api/level.js index f858c67..1b8998a 100644 --- a/api/level.js +++ b/api/level.js @@ -69,7 +69,8 @@ module.exports = async (app, req, res, api, analyze) => { } if (level.difficulty == "Extreme Demon") { - request.get('https://www.pointercrate.com/api/v1/demons/?name=' + level.name.trim(), function (err, resp, demonList) { + request.get('http://www.pointercrate.com/api/v1/demons/?name=' + level.name.trim(), function (err, resp, demonList) { + if (err) return sendLevel() let demon = JSON.parse(demonList) if (demon[0] && demon[0].position <= 150) level.demonList = demon[0].position return sendLevel() diff --git a/api/profile.js b/api/profile.js index ab513fc..a86f625 100644 --- a/api/profile.js +++ b/api/profile.js @@ -32,7 +32,7 @@ module.exports = async (app, req, res, api, getLevels) => { accountID: account[16], rank: account[30], stars: account[3], - diamonds: account[46] == '65535' ? '65535+' : account[46], + diamonds: account[46], coins: account[13], userCoins: account[17], demons: account[4], diff --git a/assets/css/browser.css b/assets/css/browser.css index eb1ef6a..613e9c9 100644 --- a/assets/css/browser.css +++ b/assets/css/browser.css @@ -1048,6 +1048,10 @@ input::-webkit-inner-spin-button { outline-offset: -0.4vh; } +.yellow { + color: #ffde00; +} + .gold { color: rgb(255, 200, 0); } diff --git a/classes/Level.js b/classes/Level.js index 9f7695c..9b83b42 100644 --- a/classes/Level.js +++ b/classes/Level.js @@ -36,7 +36,7 @@ class Level { this.verifiedCoins = levelInfo[38] == 1 this.starsRequested = levelInfo[39] this.ldm = levelInfo[40] == 1 - this.objects = levelInfo[45] == "65535" ? "65535+" : levelInfo[45] + this.objects = levelInfo[45] this.large = levelInfo[45] > 40000; this.cp = (this.stars > 0) + this.featured + this.epic diff --git a/html/leaderboard.html b/html/leaderboard.html index bb7e37d..5729fe9 100644 --- a/html/leaderboard.html +++ b/html/leaderboard.html @@ -80,7 +80,7 @@ let top250Text = `The Top 250<> leaderboard contains the top 250 players<>, sorted by star<> value. However, due to hackers<> flooding the leaderboard, this leaderboard has been frozen<> for well over 2 years and displays very outdated information<>.` let accurateText = -`The Accurate Leaderboard<> is a highly accurate, hacker-proof leaderboard with proper stats and positioning<> (unlike the regular one). It is managed by SMJSGaming, XShadowWizardX, Pepper360, Octeract<>, and many many other helpers. You can check out their interactive leaderboard spreadsheet here<>.` +`The Accurate Leaderboard<> is a highly accurate, hacker-proof leaderboard with proper stats and positioning<> (unlike the regular one). It is managed by SMJSGaming, XShadowWizardX, Pepper360, Octeract<>, and many many other helpers. You can check out their interactive leaderboard spreadsheet here<>.` let creatorText = `The Creators Leaderboard<> is sorted by creator points<>, rather than stars. A player's creator points<> (CP) is calculated by counting their number of star rated<> levels, plus an extra point for every level that has been featured<>, plus an additional point for epic rated<> levels.` @@ -114,12 +114,12 @@ function leaderboard(val) { $('#searchBox').append(`

${x.username}

-

${x.stars} ${x.stars}

- ${x.diamonds} - ${x.coins} + = 65535 ? " class='blue'" : ""}>${x.diamonds} + = 149 ? " class='yellow'" : ""}>${x.coins} ${x.usercoins} ${x.demons} ${x.cp != 0 ? `${x.cp} ` : ""} diff --git a/html/profile.html b/html/profile.html index d54854a..180c6c1 100644 --- a/html/profile.html +++ b/html/profile.html @@ -83,9 +83,9 @@

- [[STARS]] - [[DIAMONDS]] - [[COINS]] + [[STARS]] + [[DIAMONDS]] + [[COINS]] [[USERCOINS]] [[DEMONS]] [[CP]] @@ -267,6 +267,10 @@ $('#content').on('input', function() { $('#charcount').text(remaining) }) +if ([[DIAMONDS]] >= 65535) $('#diamonds').addClass('blue') +if ([[COINS]] >= 149) $('#coins').addClass('yellow') +if ([[STARS]] >= 100000) $('#stars').addClass('yellow') + $('#submitComment').click(function () { let comment = $('#content').val() let username = '[[USERNAME]]'