added: confirmation before sending sms

This commit is contained in:
quenousimporte 2023-07-06 15:08:31 +02:00
parent 269d3d4293
commit a4ca26115c
1 changed files with 8 additions and 5 deletions

13
main.js
View File

@ -387,11 +387,14 @@ var snippets = [
function sms() function sms()
{ {
queryremote({action: "sms", data: currentnote.content.replace(/\n/g, " ")}) if (confirm("Send note by SMS?"))
.then(data =>
{ {
showtemporaryinfo("SMS sent. Result: '" + data.result + "'"); queryremote({action: "sms", data: currentnote.content.replace(/\n/g, " ")})
}); .then(data =>
{
showtemporaryinfo("SMS sent. Result: '" + data.result + "'");
});
}
} }
function ask(question) function ask(question)
@ -2456,4 +2459,4 @@ function focuseditor()
md.focus(); md.focus();
console.log("Forced focus"); console.log("Forced focus");
} }
} }