forked from laksa19/myqr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
116 lines (116 loc) · 3.49 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>MIKHMON QR CODE SCANNER</title>
<style>
video {
width: 100% !important;
height: auto !important;
}
.btn{
margin-top:5px;
margin-bottom:10px;
padding:5px;
background-color: #20a8d8;
color: #f3f4f5;
border-radius:3px;
width: 150px;
cursor: pointer;
}
.camera{
padding:5px;
background-color: #20a8d8;
border-radius:3px;
width: 80%;
}
a{
text-decoration: none;
color:#20a8d8;
}
.progress{
padding:10px;
margin-top:5px;
}
.progress span{
transition: all 500ms ease;
background: grey;
box-shadow: 1px 2px 3px #999;
height: 10px;
width: 10px;
display: inline-block;
border-radius: 10px;
animation: wave 2s ease infinite;
}
.progress span:nth-child(1){ animation-delay: 0; }
.progress span:nth-child(2){ animation-delay: 100ms; }
.progress span:nth-child(3){ animation-delay: 200ms; }
.progress span:nth-child(4){ animation-delay: 300ms; }
.progress span:nth-child(5){ animation-delay: 400ms; }
.progress span:nth-child(6){ animation-delay: 500ms; }
.progress span:nth-child(7){ animation-delay: 600ms; }
.progress span:nth-child(8){ animation-delay: 700ms; }
@keyframes wave{
0%, 40%, 100% {
transform: translate(0, 0);
background-color: grey;
}
10% {
transform: translate(0, -15px);
background-color: #20a8d8;
}
}
</style>
<script type="text/javascript" src="llqrcode.js"></script>
<script type="text/javascript" src="webqr.js"></script>
</head>
<body>
<center>
<div id="main">
<div id="mainbody">
<div class="progress">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="camera" id="outdiv"></div>
<div style="display: table;">
<div style="display: table-row;">
<div style="display: table-cell; padding:3px;">
<div class="btn" id="reload" onclick="location.reload();">Reload Camera</div>
</div>
<div style="display: table-cell; padding:3px;">
<div class="btn" onclick="document.location = 'googlechrome://navigate?url=https://laksa19.github.io/myqr/';">Open in Chrome</div>
<!--<div class="btn" onclick="openInChrome();">Open in Chrome</div>-->
</div>
</div>
</div>
</div>
</div>
<div>MIKHMON QR CODE SCANNER <br>Powered by <a href="http://www.webqr.com">webqr.com</a></div>
</center>
<canvas style="display:none;" id="qr-canvas" width="800" height="600"></canvas>
<script type="text/javascript">load();</script>
<script>
function openInChrome(){
String url = "https://laksa19.github.io/myqr/";
try {
Intent i = new Intent("android.intent.action.MAIN");
i.setComponent(ComponentName.unflattenFromString("com.android.chrome/com.android.chrome.Main"));
i.addCategory("android.intent.category.LAUNCHER");
i.setData(Uri.parse(url));
startActivity(i);
}
catch(ActivityNotFoundException e) {
// Chrome is probably not installed
}
}
</script>
</body>
</html>