mirror of
https://github.com/zadam/trilium.git
synced 2025-10-27 16:26:31 +01:00
jump to note now has full list of notes
This commit is contained in:
@@ -34,27 +34,11 @@ function getAutocompleteItems(noteIds) {
|
||||
}
|
||||
}
|
||||
|
||||
autocompleteItems.sort((a, b) => a.value < b.value ? -1 : 1);
|
||||
|
||||
return autocompleteItems;
|
||||
}
|
||||
|
||||
function uint8ToBase64(u8Arr) {
|
||||
const CHUNK_SIZE = 0x8000; //arbitrary number
|
||||
const length = u8Arr.length;
|
||||
let index = 0;
|
||||
let result = '';
|
||||
let slice;
|
||||
while (index < length) {
|
||||
slice = u8Arr.subarray(index, Math.min(index + CHUNK_SIZE, length));
|
||||
result += String.fromCharCode.apply(null, slice);
|
||||
index += CHUNK_SIZE;
|
||||
}
|
||||
return btoa(result);
|
||||
}
|
||||
|
||||
function base64ToUint8Array(base64encoded) {
|
||||
return new Uint8Array(atob(base64encoded).split("").map(c => c.charCodeAt(0)));
|
||||
}
|
||||
|
||||
function getDateFromTS(timestamp) {
|
||||
// Date accepts number of milliseconds since epoch so UTC timestamp works without any extra handling
|
||||
// see https://stackoverflow.com/questions/4631928/convert-utc-epoch-to-local-date-with-javascript
|
||||
|
||||
Reference in New Issue
Block a user