diff --git a/output/js/constants.js b/output/js/constants.js index 72cb8ec..e2f8b4b 100644 --- a/output/js/constants.js +++ b/output/js/constants.js @@ -29,7 +29,8 @@ export const dom = { details_modal_qr_code: () => document.getElementById('details-modal-qr-code'), join_urls: () => document.getElementsByClassName("join_url_container"), servers_hidden: () => document.getElementById("servers_hidden"), - snackbar: () => document.getElementById("copy-snackbar") + snackbar: () => document.getElementById("copy-snackbar"), + qr_code_buttons: () => document.querySelectorAll('.qr-code-button'), } export const JOIN_URL_PASTE = "Copied URL to clipboard. Paste into Session app to join"; diff --git a/output/main.js b/output/main.js index 3ad696a..28bfbe0 100644 --- a/output/main.js +++ b/output/main.js @@ -159,6 +159,14 @@ function addQRModalHandlers() { copyToClipboard(`@${staffId}`, 'Copied staff ID to clipboard.'); } ) + + for (const anchor of dom.qr_code_buttons()) { + // Disable QR code links + anchor.setAttribute("href", "#"); + anchor.removeAttribute("target"); + anchor.addEventListener('click', (e) => { e.preventDefault(); return false }); + } + } function createJoinLinkButtons() { diff --git a/sites/+components/qr_modals.php b/sites/+components/qr_modals.php index d9d53cd..4184fab 100644 --- a/sites/+components/qr_modals.php +++ b/sites/+components/qr_modals.php @@ -1,5 +1,5 @@ diff --git a/sites/+components/tbl_communities.php b/sites/+components/tbl_communities.php index 0b88788..711f0ad 100644 --- a/sites/+components/tbl_communities.php +++ b/sites/+components/tbl_communities.php @@ -1,6 +1,7 @@ - Pictogram of a QR code + Pictogram of a QR code +