🐛 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("\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};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue