🐛 More replaceAll changes
This commit is contained in:
parent
89669b1ef8
commit
77d4b00594
1 changed files with 3 additions and 3 deletions
6
main.js
6
main.js
|
@ -13,7 +13,7 @@ function createFilename(prideflag, text, now = false) {
|
||||||
.replaceAll("⋅", "_")
|
.replaceAll("⋅", "_")
|
||||||
.replaceAll(" ", "_")
|
.replaceAll(" ", "_")
|
||||||
.replaceAll("\n", '-')
|
.replaceAll("\n", '-')
|
||||||
.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
|
.normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "")
|
||||||
.replaceAll("&", "and")
|
.replaceAll("&", "and")
|
||||||
.replaceAll("+", "")
|
.replaceAll("+", "")
|
||||||
.toLowerCase();
|
.toLowerCase();
|
||||||
|
@ -22,7 +22,7 @@ function createFilename(prideflag, text, now = false) {
|
||||||
|
|
||||||
function createButton(source, x, y, text, gravity) {
|
function createButton(source, x, y, text, gravity) {
|
||||||
const turnedText = text
|
const turnedText = text
|
||||||
.replace("⋅", "-")
|
.replaceAll("⋅", "-")
|
||||||
.toUpperCase();
|
.toUpperCase();
|
||||||
|
|
||||||
return myGm(source)
|
return myGm(source)
|
||||||
|
@ -41,7 +41,7 @@ function createButton(source, x, y, text, gravity) {
|
||||||
|
|
||||||
function createMetadatas(prideflag, text, now = false) {
|
function createMetadatas(prideflag, text, now = false) {
|
||||||
const filename = createFilename(prideflag, text, now);
|
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!": ""}"`
|
const alt = `Drapeau ${prideflag.name.fr.toLowerCase()} avec écrit "${textForAlt}${now?", now!": ""}"`
|
||||||
return {file:filename, alt:alt, text:textForAlt};
|
return {file:filename, alt:alt, text:textForAlt};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue