-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (63 loc) · 2.91 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/icon-64x64.png" />
<title>qrcodekit</title>
<link rel="apple-touch-icon" sizes="180x180" href="/path/to/icon-180x180.png" />
<link rel="apple-touch-icon" sizes="192x192" href="/path/to/icon-192x192.png" />
<link rel="apple-touch-icon" sizes="512x512" href="/path/to/icon-512x512.png" />
<meta name="viewport" content="width=device-width,initial-scale=1,interactive-widget=resizes-content" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<meta name="apple-mobile-web-app-title" content="qrcodekit" />
<link rel="stylesheet" href="style.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"
integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-qrcode/2.3.8/html5-qrcode.min.js"
integrity="sha512-r6rDA7W6ZeQhvl8S7yRVQUKVHdexq+GAlNkNNqVC7YyIV+NwqCTJe2hDWCiffTyRNOeGEzRRJ9ifvRm/HCzGYg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/autosize.js/6.0.1/autosize.min.js"
integrity="sha512-OjjaC+tijryqhyPqy7jWSPCRj7fcosu1zreTX1k+OWSwu6uSqLLQ2kxaqL9UpR7xFaPsCwhMf1bQABw2rCxMbg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" media="print"
onload="this.media='all'" />
<noscript>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" />
</noscript>
</head>
<body>
<div class="container">
<textarea id="text-input" rows="1" placeholder="Type here to generate QR code" autofocus></textarea>
<div id="qrcode"></div>
<div id="qr-reader"></div>
<div id="buttons">
<button id="download" onclick="downloadQRCode()" class="material-symbols-outlined">
download
</button>
<button id="copy" onclick="copyQRCode()" class="material-symbols-outlined">
content_copy
</button>
</div>
</div>
<script src="script.js"></script>
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker
.register("/service-worker.js")
.then(function (registration) {
console.log(
"Service Worker registered successfully:",
registration.scope,
);
})
.catch(function (error) {
console.log("Service Worker registration failed:", error);
});
}
</script>
</body>
</html>