Set default filename when exporting single note (#2339)
This commit is contained in:
parent
734057ff9b
commit
9cf45c0a0b
1 changed files with 7 additions and 0 deletions
|
@ -79,6 +79,13 @@ Zotero_File_Exporter.prototype.save = async function () {
|
|||
if (htmlTranslator) {
|
||||
htmlTranslator.label = 'HTML';
|
||||
}
|
||||
|
||||
if (this.items.length == 1) {
|
||||
let noteTitle = Zotero.Utilities.Item.noteToTitle(this.items[0].getNote());
|
||||
if (noteTitle) {
|
||||
this.name = Zotero.File.getValidFileName(noteTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Otherwise exclude note export translators
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue