From e5a50babf715007c0275523ec970e6726648c665 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 14 May 2024 16:11:56 +0200 Subject: [PATCH] add setting for first name --- main.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 3a282f4..f3300d3 100644 --- a/main.js +++ b/main.js @@ -13,7 +13,8 @@ var defaultsettings = colors: true, tagsinlists: true, uselinkpopup: true, - downloadextension: ".md" + downloadextension: ".md", + firstname: "Simon" }; //builtin @@ -226,13 +227,13 @@ var snippets = [ { command: "/bonjour", hint: "Standard answer (fr)", - insert: "Bonjour ,\n\n\n\nBien cordialement,\nSimon", + insert: "Bonjour ,\n\n\n\nBien cordialement,\n", cursor: -29 }, { command: "/hello", hint: "Standard answer (en)", - insert: "Hello ,\n\n\n\nKind regards,\nSimon", + insert: "Hello ,\n\n\n\nKind regards,\n", cursor: -24 }, { @@ -1146,6 +1147,9 @@ function loadsettings() colored.hidden = !settings.colors; md.style.color = settings.colors ? "transparent" : "inherit"; md.style.background = settings.colors ? "transparent" : "inherit"; + + snippets.find(s => s.command == "/bonjour").insert = "Bonjour ,\n\n\n\nBien cordialement,\n" + settings.firstname; + snippets.find(s => s.command == "/hello").insert = "Hello ,\n\n\n\nKind regards,\n" + settings.firstname; } function checksaved()