forked from LafeLabs/trashbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qrcode.html
118 lines (97 loc) · 2.76 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
110
111
112
113
114
115
116
117
118
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--
EVERYTHING IS PHYSICAL
EVERYTHING IS FRACTAL
EVERYTHING IS RECURSIVE
NO MONEY
MO MINING
NO PROPERTY
LOOK AT THE INSECTS
LOOK AT THE FUNGI
LANGUAGE IS HOW THE MIND PARSES REALITY
-->
<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 class= "toplink" href = "index.html">
HOME
</a>
<table>
<tr>
<td></td>
<td class = "button" id = "urlbutton">LOAD CURRENT URL</td>
</tr>
<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").onchange = function(){
globalurl= this.value;
qrcode.makeCode(globalurl);
document.getElementById("linklink").href = globalurl;
document.getElementById("linklink").innerHTML = globalurl;
}
qrcode = new QRCode(document.getElementById("qrcode"), {
text: globalurl,
width: codesquaresize,
height: codesquaresize,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
document.getElementById("urlbutton").onclick = function(){
var localurl = window.location.href.split("qrcode.html")[0];
document.getElementById("urlinput").value = localurl;
globalurl= localurl;
qrcode.makeCode(globalurl);
document.getElementById("linklink").href = globalurl;
document.getElementById("linklink").innerHTML = globalurl;
}
</script>
<style>
input{
border:solid;
}
body{
font-family:courier;
}
canvas,img{
border:solid;
border-width:4px;
margin:1em 1em 1em 1em;
}
.toplink{
border:solid;
text-align:center;
}
.button{
cursor:pointer;
text-align:center;
border:solid;
border-radius:3px;
}
.button:hover{
background-color:green;
}
.button:active{
background-color:yellow;
}
</style>
</body>
</html>