Add support for hashed pet images on homepage

This commit is contained in:
Steve C 2024-09-09 09:06:29 -04:00
parent 2ffad8120e
commit a7638ef510

View file

@ -115,7 +115,15 @@
key.substr(2) +
"/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);
} else if (base === "url") {
return key;