mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	handling of beforeunload - we save the note before unloading the page
This commit is contained in:
		
							parent
							
								
									1f7f7d105c
								
							
						
					
					
						commit
						af33a30ad8
					
				| @ -232,3 +232,8 @@ $("#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
	 azivner
						azivner