"use strict"; const noteHistory = (function() { const $dialog = $("#note-history-dialog"); const $list = $("#note-history-list"); const $content = $("#note-history-content"); const $title = $("#note-history-title"); let historyItems = []; async function showCurrentNoteHistory() { await showNoteHistoryDialog(noteEditor.getCurrentNoteId()); } async function showNoteHistoryDialog(noteId, noteRevisionId) { glob.activeDialog = $dialog; $dialog.dialog({ modal: true, width: 800, height: 700 }); $list.empty(); $content.empty(); historyItems = await server.get('notes-history/' + noteId); for (const item of historyItems) { const dateModified = parseDate(item.dateModifiedFrom); $list.append($('