QR code preloading

dev
gravel 2 years ago
parent 8216b28f83
commit a8051aa8a3
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -69,6 +69,7 @@ function onLoad() {
markSortableColumns();
addQRModalHandlers();
addServerIconInteractions();
preloadQRCodes();
}
function displayQRModal(communityID) {
@ -170,6 +171,16 @@ function addQRModalHandlers() {
}
function preloadQRCodes() {
const rows = dom.tbl_communities_content_rows();
const identifiers = rows.map(
rowElement => rowElement.getAttribute(ATTRIBUTES.ROW.IDENTIFIER)
);
for (const identifier of identifiers) {
(new Image()).src = communityQRCodeURL(identifier);
}
}
function createJoinLinkButtons() {
const join_URLs = dom.join_urls();
Array.from(join_URLs).forEach((td_url) => {

@ -55,7 +55,7 @@
</div>
<div id="details-modal-end">
<img
src="qr-codes/android+118d.png"
src=""
id="details-modal-qr-code"
title="Community join link encoded as QR code"
>

Loading…
Cancel
Save