Add support for hashed pet images on homepage #3

Closed
dice wants to merge 1 commit from dice/impress:fix-hashed-pets-on-homepage into main
Showing only changes of commit a7638ef510 - Show all commits

View file

@ -115,7 +115,15 @@
key.substr(2) + key.substr(2) +
"/300x300.png" "/300x300.png"
); );
} else if (base === "cp" || base === "cpn") { }
if (key.substr(0, 1) === "@") {
// support hashed pets
base = "cp";
key = key.substr(1);
}
if (base === "cp" || base === "cpn") {
return petImage(base + "/" + key, quality); return petImage(base + "/" + key, quality);
} else if (base === "url") { } else if (base === "url") {
return key; return key;