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