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()