further refactorings, got rid of init.js

This commit is contained in:
azivner
2018-03-26 22:29:14 -04:00
parent 57d19f3302
commit 788ac43ad1
10 changed files with 264 additions and 226 deletions

View File

@@ -395,6 +395,10 @@ $(document).ready(() => {
$noteDetail.attr("tabindex", 2);
});
// this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved
// this sends the request asynchronously and doesn't wait for result
$(window).on('beforeunload', saveNoteIfChanged);
$(document).bind('keydown', "ctrl+return", executeCurrentNote);
$executeScriptButton.click(executeCurrentNote());