diff --git a/.gitignore b/.gitignore
index 4faa183..b81e949 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
# Ew
extra
package-lock.json
-misc/secretStuff.json
# Logs
logs
diff --git a/README.md b/README.md
index 6ad4877..523b14d 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ If you want to disable rate limits, ip forwarding, etc you can do so by modifyin
Hold up, wait a minute... private servers are an official feature now!
-If you would like to add your GDPS to GDBrowser, simply reach out to me on [Twitter](https://twitter.com/TheRealGDColon) and I'll be happy to add it (provided the server is relatively large and active)
+If you would like to add your GDPS to GDBrowser, [fill out this quick form](https://forms.gle/kncuRqyKykQX42QD7) and I'll be happy to add it (provided the server is relatively large and active)
If you 100% insist on adding a private server to your own magical little fork, you can do so by adding it to **servers.json**. Simply add a new object to the array with the following information:
@@ -60,6 +60,8 @@ There's also a few optional values for fine-tuning. I'll add more over time
[array] **disabled:** An array of menu buttons to "disable" (mappacks, gauntlets, daily, weekly, etc). They appear greyed out but are still clickable.
+[bool] **pinned:** "Pins" the server to the top of the GDPS list. It appears above all unpinned servers and is not placed in alphabetical order.
+
[bool] **onePointNine:** Makes a bunch of fancy changes to better fit 1.9 servers. (removes orbs/diamonds, hides some pointless buttons, etc)
[bool] **weeklyLeaderboard:** Enables the lost but not forgotten Weekly Leaderboard, for servers that still milk it
diff --git a/api/download.js b/api/download.js
index 4837e19..0bcc487 100644
--- a/api/download.js
+++ b/api/download.js
@@ -64,7 +64,7 @@ module.exports = async (app, req, res, api, ID, analyze) => {
level = level.getSongInfo(app.parseResponse(songRes, '~|~'))
level.extraString = levelInfo[36]
level.data = levelInfo[4]
- if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.endpoint
+ if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.server.id
if (analyze) return app.run.analyze(app, req, res, level)
diff --git a/api/level.js b/api/level.js
index fb8dc62..6a1aeaa 100644
--- a/api/level.js
+++ b/api/level.js
@@ -32,7 +32,7 @@ module.exports = async (app, req, res, api, analyze) => {
let level = new Level(levelInfo, req.server, false, author).getSongInfo(song)
if (!level.id) return rejectLevel()
- if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.endpoint
+ if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.server.id
if (level.author != "-") app.userCache(req.id, level.accountID, level.playerID, level.author)
function sendLevel() {
diff --git a/api/search.js b/api/search.js
index e8cb53b..7591ac4 100644
--- a/api/search.js
+++ b/api/search.js
@@ -126,7 +126,7 @@ module.exports = async (app, req, res) => {
level.demonPosition = demonList[req.id].list.indexOf(level.id) + 1
}
- if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.endpoint
+ if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.server.id
if (level.author != "-" && app.config.cacheAccountIDs) app.userCache(req.id, level.accountID, level.playerID, level.author)
//this is broken if you're not on page 0, blame robtop
diff --git a/assets/gdps/16gdps_icon.png b/assets/gdps/16gdps_icon.png
deleted file mode 100644
index 1de40ff..0000000
Binary files a/assets/gdps/16gdps_icon.png and /dev/null differ
diff --git a/assets/gdps/16gdps_logo.png b/assets/gdps/16gdps_logo.png
deleted file mode 100644
index 1411e65..0000000
Binary files a/assets/gdps/16gdps_logo.png and /dev/null differ
diff --git a/assets/gdps/aurora_icon.png b/assets/gdps/aurora_icon.png
deleted file mode 100644
index 562fffd..0000000
Binary files a/assets/gdps/aurora_icon.png and /dev/null differ
diff --git a/assets/gdps/aurora_logo.png b/assets/gdps/aurora_logo.png
deleted file mode 100644
index 9d7ce16..0000000
Binary files a/assets/gdps/aurora_logo.png and /dev/null differ
diff --git a/assets/gdps/clarify_icon.png b/assets/gdps/clarify_icon.png
deleted file mode 100644
index e772cda..0000000
Binary files a/assets/gdps/clarify_icon.png and /dev/null differ
diff --git a/assets/gdps/clarify_logo.png b/assets/gdps/clarify_logo.png
deleted file mode 100644
index f523f9e..0000000
Binary files a/assets/gdps/clarify_logo.png and /dev/null differ
diff --git a/assets/gdps/cnek_icon.png b/assets/gdps/cnek_icon.png
deleted file mode 100644
index 0456d4b..0000000
Binary files a/assets/gdps/cnek_icon.png and /dev/null differ
diff --git a/assets/gdps/cnek_logo.png b/assets/gdps/cnek_logo.png
deleted file mode 100644
index d310993..0000000
Binary files a/assets/gdps/cnek_logo.png and /dev/null differ
diff --git a/assets/gdps/gdpseditor_icon.png b/assets/gdps/gdpseditor_icon.png
deleted file mode 100644
index aa998ce..0000000
Binary files a/assets/gdps/gdpseditor_icon.png and /dev/null differ
diff --git a/assets/gdps/gdpseditor_logo.png b/assets/gdps/gdpseditor_logo.png
deleted file mode 100644
index 128477d..0000000
Binary files a/assets/gdps/gdpseditor_logo.png and /dev/null differ
diff --git a/assets/gdps/gravity_icon.png b/assets/gdps/gravity_icon.png
deleted file mode 100644
index e9f922a..0000000
Binary files a/assets/gdps/gravity_icon.png and /dev/null differ
diff --git a/assets/gdps/gravity_logo.png b/assets/gdps/gravity_logo.png
deleted file mode 100644
index 631bd8f..0000000
Binary files a/assets/gdps/gravity_logo.png and /dev/null differ
diff --git a/assets/gdps/multiverse_icon.png b/assets/gdps/multiverse_icon.png
deleted file mode 100644
index 54fc41f..0000000
Binary files a/assets/gdps/multiverse_icon.png and /dev/null differ
diff --git a/assets/gdps/multiverse_logo.png b/assets/gdps/multiverse_logo.png
deleted file mode 100644
index 326aee8..0000000
Binary files a/assets/gdps/multiverse_logo.png and /dev/null differ
diff --git a/assets/gdps/neon_icon.png b/assets/gdps/neon_icon.png
deleted file mode 100644
index 933715e..0000000
Binary files a/assets/gdps/neon_icon.png and /dev/null differ
diff --git a/assets/gdps/neon_logo.png b/assets/gdps/neon_logo.png
deleted file mode 100644
index accb423..0000000
Binary files a/assets/gdps/neon_logo.png and /dev/null differ
diff --git a/assets/gdps/resurrection_icon.png b/assets/gdps/resurrection_icon.png
deleted file mode 100644
index 76eda40..0000000
Binary files a/assets/gdps/resurrection_icon.png and /dev/null differ
diff --git a/assets/gdps/resurrection_logo.png b/assets/gdps/resurrection_logo.png
deleted file mode 100644
index 9fe1e7e..0000000
Binary files a/assets/gdps/resurrection_logo.png and /dev/null differ
diff --git a/assets/gdps/rgdps_icon.png b/assets/gdps/rgdps_icon.png
deleted file mode 100644
index 319be9f..0000000
Binary files a/assets/gdps/rgdps_icon.png and /dev/null differ
diff --git a/assets/gdps/rgdps_logo.png b/assets/gdps/rgdps_logo.png
deleted file mode 100644
index 5fe0989..0000000
Binary files a/assets/gdps/rgdps_logo.png and /dev/null differ
diff --git a/assets/gdps/robtopgames_icon.png b/assets/gdps/robtopgames_icon.png
deleted file mode 100644
index 439f94b..0000000
Binary files a/assets/gdps/robtopgames_icon.png and /dev/null differ
diff --git a/assets/gdps/robtopgames_logo.png b/assets/gdps/robtopgames_logo.png
deleted file mode 100644
index 218243d..0000000
Binary files a/assets/gdps/robtopgames_logo.png and /dev/null differ
diff --git a/assets/gdps/silvrps_icon.png b/assets/gdps/silvrps_icon.png
deleted file mode 100644
index fe267dd..0000000
Binary files a/assets/gdps/silvrps_icon.png and /dev/null differ
diff --git a/assets/gdps/silvrps_logo.png b/assets/gdps/silvrps_logo.png
deleted file mode 100644
index 3f94331..0000000
Binary files a/assets/gdps/silvrps_logo.png and /dev/null differ
diff --git a/assets/gdps/supreme_icon.png b/assets/gdps/supreme_icon.png
deleted file mode 100644
index b65ed81..0000000
Binary files a/assets/gdps/supreme_icon.png and /dev/null differ
diff --git a/assets/gdps/supreme_logo.png b/assets/gdps/supreme_logo.png
deleted file mode 100644
index 1ca5abe..0000000
Binary files a/assets/gdps/supreme_logo.png and /dev/null differ
diff --git a/assets/gdps/unknown_icon.png b/assets/gdps/unknown_icon.png
deleted file mode 100644
index a1c3cdd..0000000
Binary files a/assets/gdps/unknown_icon.png and /dev/null differ
diff --git a/assets/gdps/unknown_logo.png b/assets/gdps/unknown_logo.png
deleted file mode 100644
index 1848e21..0000000
Binary files a/assets/gdps/unknown_logo.png and /dev/null differ
diff --git a/assets/gdps/vps_icon.png b/assets/gdps/vps_icon.png
deleted file mode 100644
index 938f666..0000000
Binary files a/assets/gdps/vps_icon.png and /dev/null differ
diff --git a/assets/gdps/vps_logo.png b/assets/gdps/vps_logo.png
deleted file mode 100644
index 2f3e627..0000000
Binary files a/assets/gdps/vps_logo.png and /dev/null differ
diff --git a/assets/gdps/wgdps_icon.png b/assets/gdps/wgdps_icon.png
deleted file mode 100644
index 9ac6702..0000000
Binary files a/assets/gdps/wgdps_icon.png and /dev/null differ
diff --git a/assets/gdps/wgdps_logo.png b/assets/gdps/wgdps_logo.png
deleted file mode 100644
index 49c71fd..0000000
Binary files a/assets/gdps/wgdps_logo.png and /dev/null differ
diff --git a/assets/gdps/xgdps_icon.png b/assets/gdps/xgdps_icon.png
deleted file mode 100644
index ac66cb4..0000000
Binary files a/assets/gdps/xgdps_icon.png and /dev/null differ
diff --git a/assets/gdps/xgdps_logo.png b/assets/gdps/xgdps_logo.png
deleted file mode 100644
index 507739f..0000000
Binary files a/assets/gdps/xgdps_logo.png and /dev/null differ
diff --git a/assets/gdps/zombiedash_icon.png b/assets/gdps/zombiedash_icon.png
deleted file mode 100644
index ea48f17..0000000
Binary files a/assets/gdps/zombiedash_icon.png and /dev/null differ
diff --git a/assets/gdps/zombiedash_logo.png b/assets/gdps/zombiedash_logo.png
deleted file mode 100644
index ae705b3..0000000
Binary files a/assets/gdps/zombiedash_logo.png and /dev/null differ
diff --git a/index.js b/index.js
index 4313363..8d947ba 100644
--- a/index.js
+++ b/index.js
@@ -11,6 +11,8 @@ let pinnedServers = serverList.filter(x => x.pinned)
let notPinnedServers = serverList.filter(x => !x.pinned).sort((a, b) => a.name.localeCompare(b.name))
app.servers = pinnedServers.concat(notPinnedServers)
+app.safeServers = JSON.parse(JSON.stringify(app.servers)) // clone
+app.safeServers.forEach(x => { delete x.endpoint; delete x.substitutions; delete x.overrides; delete x.disabled })
app.config = require('./settings.js')
let rlMessage = "Rate limited ¯\\_(ツ)_/¯
Please do not spam my servers with a crazy amount of requests. It slows things down on my end and stresses RobTop's servers just as much." +
@@ -139,22 +141,24 @@ directories.forEach(d => {
fs.readdirSync('./api/' + d).forEach(x => {if (x.includes('.')) app.run[x.split('.')[0]] = require('./api/' + d + "/" + x) })
})
-app.xor = new XOR() //why complicated gjp stuff just xor it
+app.xor = new XOR()
+let hasSecretStuff = false
try {
const secrets = require("./misc/secretStuff.json")
+ hasSecretStuff = true
app.id = secrets.id
- app.password = secrets.password
- app.gjp = app.xor.encrypt(app.password)
+ app.gjp = secrets.gjp || app.xor.encrypt(secrets.password)
app.sheetsKey = secrets.sheetsKey
- if (app.id == "account id goes here" || app.password == "account password goes here") console.warn("Warning: No account ID and/or password has been provided in secretStuff.json! These are required for level leaderboards to work.")
- if (app.sheetsKey.startsWith("google sheets api key")) app.sheetsKey = undefined
+ if (!Number(app.id) || !secrets.password || !secrets.gjp || (secrets.password || secrets.gjp).includes("delete this line")) console.warn("Warning: No account ID and/or password has been provided in secretStuff.json! These are required for level leaderboards to work.")
+ if (app.sheetsKey.includes("google sheets api key")) app.sheetsKey = undefined
}
catch(e) {
app.id = 0
app.gjp = 0
- console.warn("Warning: secretStuff.json has not been created! This file is required for level leaderboards to work.")
+ if (!hasSecretStuff) console.warn("Warning: secretStuff.json has not been created! This file is required for level leaderboards to work.")
+ else { console.warn("There was an error parsing your secretStuff.json file!"); console.error(e) }
}
app.parseResponse = function (responseBody, splitter) {
@@ -304,7 +308,7 @@ app.get("/icon/:text", function(req, res) { app.run.icon(app, req, res) })
app.get("/api/userCache", function(req, res) { res.send(app.accountCache) })
app.get("/api/achievements", function(req, res) { res.send({achievements, types: achievementTypes, shopIcons, colors: colorList }) })
app.get("/api/music", function(req, res) { res.send(music) })
-app.get("/api/gdps", function(req, res) {res.send(req.query.hasOwnProperty("current") ? req.server : app.servers) })
+app.get("/api/gdps", function(req, res) {res.send(req.query.hasOwnProperty("current") ? app.safeServers.find(x => req.server.id == x.id) : app.safeServers) })
app.get('/api/icons', function(req, res) {
let sample = [JSON.stringify(sampleIcons[Math.floor(Math.random() * sampleIcons.length)].slice(1))]
let iconserver = req.isGDPS ? req.server.name : undefined
diff --git a/misc/secretStuff.json b/misc/secretStuff.json
index 4dcbda6..6480716 100644
--- a/misc/secretStuff.json
+++ b/misc/secretStuff.json
@@ -1,5 +1,6 @@
{
- "id": "account id goes here",
- "password": "account password goes here",
- "sheetsKey": "google sheets api key (for accurate leaderboard - delete this line if you don't need it)"
+ "id": "[account ID here]",
+ "password": "[account password here - delete this line if you entered a GJP instead]",
+ "gjp": "[account GJP here - delete this line if you entered a password instead]",
+ "sheetsKey": "[google sheets api key (for accurate leaderboard - delete this line if you don't need it)]"
}
\ No newline at end of file
diff --git a/servers.json b/servers.json
index 79d04d6..d28c6ef 100644
--- a/servers.json
+++ b/servers.json
@@ -19,7 +19,6 @@
"authorLink": "https://www.youtube.com/channel/UClXb1w9vSL3Z0V-mUbudOnw",
"id": "22unlocked",
"endpoint": "http://smjs.eu/gd/unlock/database/",
- "pinned": true,
"disabled": ["gauntlets", "mappacks", "daily", "weekly"],
"substitutions": {
"levelID": "oereoIE",
@@ -38,176 +37,10 @@
"onePointNine": true,
"weeklyLeaderboard": true,
"demonList": "https://pointercrate.xyze.dev/",
- "pinned": true,
"overrides": {
"getGJMapPacks21": "getGJMapPacks",
"getGJScores20": "getGJScores",
"getGJComments21": "getGJComments"
}
- },
-
- {
- "name": "XGDPS",
- "link": "http://xcggdpsserver.xyz/",
- "author": "XcreatorGoal",
- "authorLink": "https://www.youtube.com/channel/UC33L-Y8asG7gju6f-4-Cl2g",
- "id": "xgdps",
- "endpoint": "http://xcggdpsserver.xyz/database/",
- "pinned": true,
- "timestampSuffix": " ago"
- },
-
- {
- "name": "GDPS Editor 2.2",
- "link": "https://discord.gg/4n8n98AkSk",
- "author": "iAndy_HD3",
- "authorLink": "https://www.youtube.com/channel/UCleHhypAuPn2o09N4ISyBxw",
- "id": "gdpseditor",
- "pinned": true,
- "endpoint": "http://ps.fhgdps.com/GDPSEditor22/"
- },
-
- {
- "name": "WGDPS",
- "link": "http://wyliegdps02.7m.pl/",
- "author": "Wylie",
- "authorLink": "https://www.youtube.com/channel/UCG5I4-KAW3Kwzam4svLJWBA",
- "id": "wgdps",
- "endpoint": "http://wyliegdps02.7m.pl/database/"
- },
-
- {
- "name": "ClarifyGDPS",
- "link": "https://clarifygdps.com/",
- "author": "Jouca",
- "authorLink": "https://www.youtube.com/channel/UCXE8HB-B4tqvI0ibjXSJ52A",
- "id": "clarify",
- "endpoint": "http://joucagdpss.clarifygdps.com/",
- "timestampSuffix": " ago"
- },
-
- {
- "name": "1.6 GDPS",
- "link": "https://discord.gg/eGWMmyk",
- "author": "Cylyrii",
- "authorLink": "https://www.youtube.com/channel/UCY-D_PGmZtR9HTeczwBxbrw",
- "id": "16gdps",
- "endpoint": "http://wayveyx.x10.mx/gdps/garlic/",
- "onePointNine": true,
- "weeklyLeaderboard": true
- },
-
- {
- "name": "CnekGDPS",
- "link": "http://cnekgdps.7m.pl/index.html/",
- "author": "Cnek",
- "authorLink": "https://www.youtube.com/channel/UCDgrf89BjVyrUYSxFIDxafw",
- "id": "cnek",
- "endpoint": "http://cnekgdps.7m.pl/cnekgdpsdtb/"
- },
-
- {
- "name": "Zombie Dash",
- "link": "http://zombiedashoficial.ddns.net/",
- "author": "Ghost Power 13",
- "authorLink": "https://www.youtube.com/channel/UCC_S4bHTIGVJiCfZsKU15Gw",
- "id": "zombiedash",
- "endpoint": "http://zombiedashoficial.ddns.net/"
- },
-
- {
- "name": "GD Gravity",
- "link": "https://discord.gg/qpUJgBC",
- "author": "Sai",
- "authorLink": "https://youtube.com/channel/UCvYEPVUVVLDhwfHCzgVdIIg",
- "id": "gravity",
- "endpoint": "http://gravity5.000webhostapp.com/"
- },
-
- {
- "name": "RealistikGDPS",
- "link": "http://rgdps.ussr.pl/",
- "author": "RealistikDash",
- "authorLink": "https://www.youtube.com/c/RealistikDash",
- "id": "rgdps",
- "endpoint": "http://rgdps.ussr.pl/gdpsdatabase/"
- },
-
- {
- "name": "Supreme GDPS",
- "link": "https://discord.gg/pAU42pbREb",
- "author": "Optimal",
- "authorLink": "https://youtube.com/c/Optimal7",
- "id": "supreme",
- "endpoint": "http://ps.fhgdps.com/supremegdps1/ "
- },
-
- {
- "name": "Aurora Dash",
- "link": "http://aurorgdpsgd.7m.pl",
- "author": "Yayi Kawaii",
- "authorLink": "https://www.youtube.com/channel/UCBH8Y_3SAYB-f-k7zFXLvtA",
- "id": "aurora",
- "endpoint": "http://aurorgdpsgd.7m.pl/database/"
- },
-
- {
- "name": "GD Multiverse",
- "link": "https://discord.gg/rJtAky72xE",
- "author": "Nonixgames",
- "authorLink": "https://youtube.com/c/Nonixgames",
- "id": "multiverse",
- "endpoint": "http://gdm2021y.000webhostapp.com/database/"
- },
-
- {
- "name": "Resurrection GDPS",
- "link": "http://gdpsresu.000webhostapp.com/",
- "author": "Switchstep",
- "authorLink": "https://www.youtube.com/channel/UCg9HipnGYtfwIax4bLTTzUQ",
- "id": "resurrection",
- "endpoint": "http://gdpsresu.000webhostapp.com/"
- },
-
- {
- "name": "SilvrPS",
- "link": "https://discord.gg/p2PStYUSGM",
- "author": "silverra",
- "authorLink": "https://www.youtube.com/channel/UCdKNL3PFoZKBkRTo41Ss_dg",
- "id": "silvrps",
- "endpoint": "http://silvrragdps.7m.pl/database/"
- },
-
- {
- "name": "NEON GDPS",
- "link": "https://discord.gg/zu6Uv95",
- "author": "PjoseP",
- "authorLink": "https://www.youtube.com/c/PjoseP",
- "id": "neon",
- "endpoint": "http://newgdpsneon.7m.pl/database/"
- },
-
- {
- "name": "VPS",
- "link": "https://discord.gg/WVVZPCsGQV",
- "author": "Vultra",
- "authorLink": "https://www.youtube.com/channel/UC6q0dlnMosjajrkSfSsOklQ",
- "id": "vps",
- "endpoint": "http://ps.fhgdps.com/VGDPSNEW6942/"
- },
-
- {
- "name": "Rob's Abandoned Server",
- "link": "http://robtopgames.com/",
- "author": "RobTop",
- "authorLink": "https://www.youtube.com/channel/UCz_yk8mDSAnxJq0ar66L4sw",
- "id": "robtopgames",
- "endpoint": "http://robtopgames.com/database/",
- "onePointNine": true,
- "timestampSuffix": " ago",
- "overrides": {
- "getGJLevels21": "getGJLevels",
- "downloadGJLevel22": "downloadGJLevel"
- }
}
]
\ No newline at end of file