mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Speed up initial load while still preventing css layout shift; Tidy up ui.js
This commit is contained in:
parent
2578803a78
commit
ed2f1b0c61
8 changed files with 353 additions and 312 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue