🎨 Put the adaptedText in a variable
This commit is contained in:
parent
e6cd9c09d5
commit
f538c62f4a
1 changed files with 6 additions and 1 deletions
7
main.js
7
main.js
|
@ -9,7 +9,12 @@ const position = {x: 4, y: 2, gravity: "NorthEast"}
|
|||
const metadatas = []
|
||||
|
||||
function createFilename(prideflag, text, now = false) {
|
||||
return `${prideflag.name.en.toLowerCase()}-${text.replaceAll("⋅", "_").replaceAll(" ", "_").replaceAll("\n", '-').toLowerCase()}${now?'-now':''}.png`;
|
||||
const adaptedText = text
|
||||
.replaceAll("⋅", "_")
|
||||
.replaceAll(" ", "_")
|
||||
.replaceAll("\n", '-')
|
||||
.toLowerCase();
|
||||
return `${prideflag.name.en.toLowerCase()}-${adaptedText}${now?'-now':''}.png`;
|
||||
}
|
||||
|
||||
function createButton(source, x, y, text, gravity) {
|
||||
|
|
Loading…
Reference in a new issue