save custom msg to json file after clicking add

This commit is contained in:
Justin 2023-07-07 17:41:14 +08:00 committed by GitHub
parent c394a216cd
commit 9d189fb9a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1600,8 +1600,8 @@ function getImageSettings(page) {
return settings;
}
// ADD MSG TO LIST AND SAVE MSG TO JSON FILE
var messages = [];
messagesTextAddBtn.addEventListener("click", () => {
let pageSelector = "Page13";
@ -1624,6 +1624,11 @@ messagesTextAddBtn.addEventListener("click", () => {
background_colour: background_colour,
};
messages.push(message);
fetch("/sendMsgToJSON", {
method: "POST",
body: JSON.stringify(message),
});
});
function getMessageSettings(page) {