mirror of
https://github.com/zadam/trilium.git
synced 2025-03-04 02:53:30 +08:00
handling of beforeunload - we save the note before unloading the page
This commit is contained in:
parent
1f7f7d105c
commit
af33a30ad8
2 changed files with 6 additions and 1 deletions
|
@ -232,3 +232,8 @@ $("#jumpToNoteForm").submit(function() {
|
|||
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).on('beforeunload', function(){
|
||||
// asynchronously send the request and don't wait for result
|
||||
saveNoteIfChanged();
|
||||
});
|
|
@ -212,5 +212,5 @@ function encryptNote() {
|
|||
// To print or store the binary data, you may convert it to hex
|
||||
let encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes);
|
||||
|
||||
console.log("encrypted: " + encryptedBytes);
|
||||
console.log("encrypted: " + encryptedHex);
|
||||
}
|
Loading…
Reference in a new issue