comparison index.html @ 10:09146b1bfb65

Large code
author nanaya <me@nanaya.pro>
date Sat, 28 Nov 2020 06:32:10 +0900
parents 5998f1f51877
children 70cfc091b2aa
comparison
equal deleted inserted replaced
9:5998f1f51877 10:09146b1bfb65
52 52
53 .outputbox.js-hidden { 53 .outputbox.js-hidden {
54 opacity: 0; 54 opacity: 0;
55 } 55 }
56 56
57 .outputbox > img {
58 max-width: 100%;
59 max-height: 100vh;
60 }
61
57 .title { 62 .title {
58 font-size: 16px; 63 font-size: 16px;
59 } 64 }
60 </style> 65 </style>
61 </head> 66 </head>
83 <script src="qrcode.min.js"></script> 88 <script src="qrcode.min.js"></script>
84 89
85 <script> 90 <script>
86 var inputDom = document.querySelector(".js-qr-input") 91 var inputDom = document.querySelector(".js-qr-input")
87 var outputDom = document.querySelector(".js-qr-output") 92 var outputDom = document.querySelector(".js-qr-output")
88 var qr = new QRCode(outputDom, { correctLevel: QRCode.CorrectLevel.L }) 93 var qr = new QRCode(outputDom, { correctLevel: QRCode.CorrectLevel.L, width: 1024, height: 1024 })
89 94
90 var runTimeout = null 95 var runTimeout = null
91 var debouncedRefreshCode = function() { 96 var debouncedRefreshCode = function() {
92 clearTimeout(runTimeout) 97 clearTimeout(runTimeout)
93 runTimeout = setTimeout(refreshCode, 100) 98 runTimeout = setTimeout(refreshCode, 100)