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

@ -23,8 +23,8 @@ for (let i = 0; i < avis.length; i++) {
const badges = {};
for (let i = 0; i < avis.length; i++) {
const l = avis[i];
const username = l.match(badgeMatcher)?.[1];
if (username) badges[username] = avis[i + 10].match(imageMatcher)[1];
const bid = l.match(badgeMatcher)?.[1];
if (bid) badges[bid] = avis[i + 10].match(imageMatcher)[1];
}
await writeFile(
@ -38,4 +38,4 @@ await writeFile(
parser: "json",
}
)
);
);