diff --git a/api/profile.js b/api/profile.js index 8a84c42..2d22dd6 100644 --- a/api/profile.js +++ b/api/profile.js @@ -2,7 +2,11 @@ const fs = require('fs') module.exports = async (app, req, res, api, getLevels) => { - if (req.offline) return res.send("-1") + if (req.offline) { + if (!api) return res.redirect('/search/' + req.params.id) + else return res.send("-1") + } + let username = getLevels || req.params.id let accountMode = !req.query.hasOwnProperty("player") && Number(req.params.id) let foundID = app.userCache(req.id, username) diff --git a/assets/leaderboardarrow.png b/assets/leaderboardarrow.png new file mode 100644 index 0000000..0ac357b Binary files /dev/null and b/assets/leaderboardarrow.png differ diff --git a/html/offline.html b/html/offline.html index b5be41b..ec6c2ee 100644 --- a/html/offline.html +++ b/html/offline.html @@ -14,7 +14,7 @@
-