🐛 More replaceAll changes

This commit is contained in:
Kazhnuz 2025-02-13 15:42:03 +01:00
parent 89669b1ef8
commit 77d4b00594

View file

@ -13,7 +13,7 @@ function createFilename(prideflag, text, now = false) {
.replaceAll("⋅", "_")
.replaceAll(" ", "_")
.replaceAll("\n", '-')
.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
.normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "")
.replaceAll("&", "and")
.replaceAll("+", "")
.toLowerCase();
@ -22,7 +22,7 @@ function createFilename(prideflag, text, now = false) {
function createButton(source, x, y, text, gravity) {
const turnedText = text
.replace("⋅", "-")
.replaceAll("⋅", "-")
.toUpperCase();
return myGm(source)
@ -41,7 +41,7 @@ function createButton(source, x, y, text, gravity) {
function createMetadatas(prideflag, text, now = false) {
const filename = createFilename(prideflag, text, now);
const textForAlt = text.replace("\n", " ").toLowerCase();
const textForAlt = text.replaceAll("\n", " ").toLowerCase();
const alt = `Drapeau ${prideflag.name.fr.toLowerCase()} avec écrit "${textForAlt}${now?", now!": ""}"`
return {file:filename, alt:alt, text:textForAlt};
}