From fac00bbbb83fa5da8e474b31817352a4a95e5e97 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Wed, 22 Jul 2020 15:47:00 +0200 Subject: [PATCH] Add direct link to QR code --- assets/scripts.js | 1 + assets/styles.css | 4 +++- views/util/qr.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/scripts.js b/assets/scripts.js index 16f72a3..c044580 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -1055,6 +1055,7 @@ if (elUtilQR) { if (elInput.value) { elInput.value = decodeURIComponent(elInput.value); qrcode.makeCode(`${elInput.value}`); + document.body.querySelector("#qrcode--altLink").href = elInput.value; } else { qrcode.clear(); } diff --git a/assets/styles.css b/assets/styles.css index 4d5236c..c955dfc 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -271,7 +271,9 @@ a.proofUrl.proofUrl--verified, a.proofQR { color: #499539; } -#qrcode img { +#qrcode { + display: flex; + justify-content: center; max-width: 100%; margin: 32px auto 16px; } diff --git a/views/util/qr.php b/views/util/qr.php index 8e4f59f..4bf66eb 100644 --- a/views/util/qr.php +++ b/views/util/qr.php @@ -6,4 +6,5 @@
+ Press this link to directly open the URI