diff --git a/main.js b/main.js index aacf21c..c0363cb 100644 --- a/main.js +++ b/main.js @@ -14,7 +14,8 @@ var defaultsettings = password: "", sync: false, tagsinlists: true, - uselinkpopup: true + uselinkpopup: true, + downloadextension: ".md" }; //builtin @@ -974,7 +975,7 @@ function sharehtml() function getfilename(title) { - return title.replace(/[\?\"<>|\*:\/\\]/g, "_"); + return title.replace(/[\?\"<>|\*:\/\\]/g, "_") + settings.downloadextension; } function download(filename, content) @@ -1093,13 +1094,13 @@ function downloadnotewithsubs() var note = withsubs(); if (note) { - download(note.title + ".md", note.content); + download(getfilename(note.title), note.content); } } function downloadnote() { - download(title.value + ".md", md.value); + download(getfilename(title.value), md.value); } function getguid(title)