Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsPi3141 committed Dec 6, 2024
1 parent 83fc74f commit 2bd0d33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion utils/collectibleCategoriesToJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function collectibleCategoriesToJson(collectibleCategories) {
file: `${p.name
.toLowerCase()
.replaceAll("'", "")
.replaceAll(/[^A-Za-z0-9]/g, "_")}.png`,
.replaceAll(/[^A-Za-z0-9]+/g, "_")
.replaceAll(/(^_|_$)/g, "")}.png`,
})),
}));
}
3 changes: 2 additions & 1 deletion utils/getAvatarDecorations.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
.querySelector("div[class*='cardText_'] div[class*='productName_']")
.innerText.toLowerCase()
.replaceAll("'", "")
.replaceAll(/[^A-Za-z0-9]/g, "_")}.png`,
.replaceAll(/[^A-Za-z0-9]+/g, "_")
.replaceAll(/(^_|_$)/g, "")}.png`,
);
}
console.log(e.join("\n"));
Expand Down

0 comments on commit 2bd0d33

Please sign in to comment.