From a4ca26115c13bd40fc358fdbd07459ae02e98115 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Thu, 6 Jul 2023 15:08:31 +0200 Subject: [PATCH] added: confirmation before sending sms --- main.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index a739744..7056f55 100644 --- a/main.js +++ b/main.js @@ -387,11 +387,14 @@ var snippets = [ function sms() { - queryremote({action: "sms", data: currentnote.content.replace(/\n/g, " ")}) - .then(data => + if (confirm("Send note by SMS?")) { - 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) @@ -2456,4 +2459,4 @@ function focuseditor() md.focus(); console.log("Forced focus"); } -} \ No newline at end of file +}