-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqrcode.html
109 lines (87 loc) · 2.45 KB
/
qrcode.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--
-->
<link href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAP//AP///wANAP8A5Dz6ABueRwAAt/8A6BonABo86AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAREREREREREREREAAAEREREREQCIgREREd3dwAAB3d3d3d3d3d3d3d3d3d3d3d3d3VVVVVVVQAFVVAAVVVQIiBRAiIBEQIAIBECAAERAgAgFgIABmYCIiBmAiIGZgIiIGYCIgZmYCIAaIAAMzMzAAiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" rel="icon" type="image/x-icon" />
<!--Stop Google:-->
<META NAME="robots" CONTENT="noindex,nofollow">
<script src = "https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
</head>
<body>
<a id= "toplink" href = "index.html">HOME</a>
<a id = "othertoplink" href = "qrcode-page.html">qrcode-page.html</a>
<table>
<tr>
<td>URL:</td>
<td><input id = "urlinput"/></td>
</tr>
</table>
<a id = "linklink"></a>
<div id = "qrcode"></div>
<script>
codesquaresize = 512;
marginsize = 40;
fontsize = 12;
//globalurl = "http://www.trashrobot.org/qrcode.html";
globalurl = window.location.href.split("qrcode.html")[0];
document.getElementById("urlinput").value = "";
document.getElementById("urlinput").select();
document.getElementById("urlinput").onchange = function(){
globalurl= this.value;
qrcode.makeCode(globalurl);
document.getElementById("linklink").href = globalurl;
document.getElementById("linklink").innerHTML = globalurl;
}
document.getElementById("linklink").href = globalurl;
document.getElementById("linklink").innerHTML = globalurl;
document.getElementById("urlinput").value = globalurl;
qrcode = new QRCode(document.getElementById("qrcode"), {
text: globalurl,
width: codesquaresize,
height: codesquaresize,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
</script>
<style>
input{
border:solid;
}
body{
font-family:courier;
}
canvas,img{
border:solid;
border-width:4px;
margin:1em 1em 1em 1em;
}
#toplink{
position:absolute;
right:0px;
top:0px;
font-size:2em;
}
#othertoplink{
position:absolute;
right:50%;
top:0px;
font-size:2em;
}
.button{
cursor:pointer;
text-align:center;
border:solid;
border-radius:3px;
}
.button:hover{
background-color:green;
}
.button:active{
background-color:yellow;
}
</style>
</body>
</html>