add download extension in settings
This commit is contained in:
parent
893b23a985
commit
83a662a09e
9
main.js
9
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)
|
||||
|
|
Loading…
Reference in New Issue