mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
handling of beforeunload - we save the note before unloading the page
This commit is contained in:
parent
1f7f7d105c
commit
af33a30ad8
@ -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…
x
Reference in New Issue
Block a user