Badge rewrite to check for ID plus script change; constant username>bid (badge ID)

This commit is contained in:
coolesding 2023-09-20 19:30:23 +01:00 committed by GitHub
parent a37cf2ecd5
commit 0faebb9321
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 28 deletions

View file

@ -41,9 +41,9 @@ const dist = [];
for (const [id, img] of Object.entries(data.avatars)) {
dist.push(templates.avatar.replace(/{id}/g, id).replace(/{img}/g, img));
}
for (const [username, img] of Object.entries(data.badges)) {
for (const [bid, img] of Object.entries(data.badges)) {
dist.push(
templates.badge.replace(/{username}/g, username).replace(/{img}/g, img)
templates.badge.replace(/{bid}/g, bid).replace(/{img}/g, img)
);
}
@ -52,4 +52,4 @@ await writeFile(
uglify ? UglifyCSS.processString(dist.join("\n")) : dist.join("\n\n")
);
console.timeEnd("Done");
console.timeEnd("Done");