diff --git a/src/main/resources/static/images/QR_code_for_mobile_English_Wikipedia.svg.png b/src/main/resources/static/images/QR_code_for_mobile_English_Wikipedia.svg.png new file mode 100644 index 0000000000000000000000000000000000000000..a66fb3c2a1596251164075828413368656bfb0c9 Binary files /dev/null and b/src/main/resources/static/images/QR_code_for_mobile_English_Wikipedia.svg.png differ diff --git a/src/main/resources/static/qr-scanner.html b/src/main/resources/static/qr-scanner.html index 165972551b8360239977baed4cc7e3202e6eabe3..0a21dda5ff3bd1ed5d7cea32a1d216628d5c21a0 100644 --- a/src/main/resources/static/qr-scanner.html +++ b/src/main/resources/static/qr-scanner.html @@ -6,7 +6,7 @@ <meta name="viewpoint" content="width-device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/qrstyle.css"> <script src="https://unpkg.com/html5-qrcode"></script> - <script type="module" src="scripts/qr-script.mjs"></script> + <script type="module" src="scripts/qr-script.js"></script> <title>QR Code</title> </head> diff --git a/src/main/resources/static/scripts/qr-script.mjs b/src/main/resources/static/scripts/qr-script.mjs deleted file mode 100644 index d75d9513e291ee39af4526a9b82dc1cdb31917fc..0000000000000000000000000000000000000000 --- a/src/main/resources/static/scripts/qr-script.mjs +++ /dev/null @@ -1,25 +0,0 @@ -//qr-script file - R Nute -import {Html5QrcodeScanner} from "html5-qrcode"; - -function domReady(fn){ - if ( - document.readyState === "complete" || - document.readyState === "interactive" - ){ - setTimeout(fn, 1000); - } else { - document.addEventListener("DOMContentLoaded", fn); - } -} -domReady(function (message){ - //if QR code found - function onScanSuccess(decodeText, decodeResult){ - alert("You have collected: " + decodeText, decodeResult); - } - let htmlscanner = new Html5QrcodeScanner( - "qr-code-reader", - { fps: 20, qrbos: 250} - ); - htmlscanner.render(onScanSuccess); -}); -