Speed up initial load while still preventing css layout shift; Tidy up ui.js

This commit is contained in:
schlagmichdoch 2023-10-11 23:22:10 +02:00
parent 2578803a78
commit ed2f1b0c61
8 changed files with 353 additions and 312 deletions

View file

@ -407,6 +407,11 @@ function getUrlWithoutArguments() {
return `${window.location.protocol}//${window.location.host}${window.location.pathname}`;
}
function changeFavicon(src) {
document.querySelector('[rel="icon"]').href = src;
document.querySelector('[rel="shortcut icon"]').href = src;
}
function arrayBufferToBase64(buffer) {
var binary = '';
var bytes = new Uint8Array(buffer);
@ -425,4 +430,4 @@ function base64ToArrayBuffer(base64) {
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
}
}