Skip to content

Commit

Permalink
Profile Viewer: Show platform
Browse files Browse the repository at this point in the history
Useful for cases where account was migrated and the name may differ
  • Loading branch information
Sainan committed Jun 30, 2024
1 parent abf673d commit 4d98329
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@
"EventSyndicate",
];
const vallisRaceNames = [0, "Puffin’ Pastures", "Bomb the Spaceport", "Shaving Nef", "Anyo’s Ointment", "Grinding the Void", "Fortuna’s Folley", "Taxman’s Curve", "Kubrodon Twist", "Mumsie Dadsie", "Catalyst", "Skeggin’ Out", "Deathgrip", "Dog Line", "River Run", "The Hard Way", "Sky-Eye", "Pobber’s Drop", "Lord of the Board", "Breakdown Or Bust", "Frost Merchant", "Roky’s Roll", "Meat and Greet"];
const platformNames = {
"pc": "PC",
"ps4": "PlayStation",
"xb1": "Xbox",
"swi": "Switch",
};

function peColourToHex(colour)
{
Expand Down Expand Up @@ -504,7 +510,7 @@ function renderProfile()
document.querySelector("#status").classList.add("d-none");

document.getElementById("profile-name").textContent = profile.Results[0].DisplayName;
document.getElementById("mr").textContent = "Mastery Rank " + (profile.Results[0].PlayerLevel ?? 0);
document.getElementById("mr").textContent = platformNames[profile.platform] + " Account, Mastery Rank " + (profile.Results[0].PlayerLevel ?? 0);

const accolades = [];
if (profile.Results[0].Staff)
Expand Down
2 changes: 1 addition & 1 deletion supplemental-data/profile-[DE]Rebecca.json

Large diffs are not rendered by default.

0 comments on commit 4d98329

Please sign in to comment.