mirror of
https://github.com/zadam/trilium.git
synced 2025-10-06 05:25:37 +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
|
@ -231,4 +231,9 @@ $("#jumpToNoteForm").submit(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
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
|
// To print or store the binary data, you may convert it to hex
|
||||||
let encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes);
|
let encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes);
|
||||||
|
|
||||||
console.log("encrypted: " + encryptedBytes);
|
console.log("encrypted: " + encryptedHex);
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue