F5 now reloads and ctrl-shift-i shows up dev tools

This commit is contained in:
azivner
2017-11-16 19:43:34 -05:00
parent c371ffb597
commit fed1cab2c9
3 changed files with 17 additions and 3 deletions

View File

@@ -24,6 +24,20 @@ $(document).bind('keydown', 'alt+t', () => {
$('#note-detail').summernote('insertText', dateString);
});
$(document).bind('keydown', 'f5', () => {
location.reload();
return false;
});
$(document).bind('keydown', 'ctrl+shift+i', () => {
if (isElectron()) {
require('remote').getCurrentWindow().toggleDevTools();
return false;
}
});
$(window).on('beforeunload', () => {
// 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