diff --git a/static/css/linx.css b/static/css/linx.css index 6dce9c1..88a3826 100644 --- a/static/css/linx.css +++ b/static/css/linx.css @@ -284,6 +284,7 @@ body { color: #800000; } +/* Center the QR code */ .qrcode > canvas, .qrcode > img { margin: 0 auto; padding: 10px; diff --git a/static/js/upload.js b/static/js/upload.js index 5608619..fc21812 100644 --- a/static/js/upload.js +++ b/static/js/upload.js @@ -1,5 +1,19 @@ // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later +var qrCodeCheckbox = document.getElementById("qrcode-show"); +if (qrCodeCheckbox !== null) { + qrCodeCheckbox.addEventListener('change', function() { + var qrCodeCheckbox = document.getElementById("qrcode-show"); + if (qrCodeCheckbox == null) { + return; + } + var qrCodes = document.getElementsByClassName('qrcode'); + for(var i=0; i +