mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-26 17:40:38 +00:00
Speed up initial load while still preventing css layout shift; Tidy up ui.js
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user