-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqrcode-page.html
172 lines (142 loc) · 4.48 KB
/
qrcode-page.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!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>
<div id = "mushroom" style = "font-size:10em;cursor:pointer;">🍄CLICK ME🍄</div>
<a id= "toplink" href = "index.html">HOME</a>
<table>
<tr>
<td>URL:</td>
<td><input id = "urlinput"/></td>
<td id = "reloadbutton" class= "button">LOADPAGE</td>
</tr>
<tr>
<td>TEXT:</td>
<td><input id = "textinput"/></td>
</tr>
</table>
<a style = "display:none" id = "linklink"></a>
<div style = "display:none" id = "qrcode"></div>
<table id = "pagetable"></table>
<script>
codesquaresize = 120;
marginsize = 40;
fontsize = 12;
//globalurl = "http://www.trashrobot.org/qrcode.html";
globalurl = window.location.href.split("qrcode-page.html")[0];
//globalurl = "https://www.southplatte.net";
//urltext = globalurl;
capsurl = globalurl.toUpperCase();
capsurl = capsurl.replace("HTTPS://","");
capsurl = capsurl.replace("HTTP://","");
capsurl = capsurl.replace(/\//g,"/<BR/>");
//console.log(capsurl);
//urltext = "TRASH MAGIC<BR>HYPERSIGN<BR>SOUTHPLATTE.NET";
urltext = "TRASH MAGIC<BR>" + capsurl;
document.getElementById("urlinput").value = "";
document.getElementById("textinput").value = "";
document.getElementById("urlinput").select();
table = document.getElementById("pagetable");
document.getElementById("urlinput").onchange = function(){
loadtable();
}
document.getElementById("textinput").onchange = function(){
loadtable();
}
document.getElementById("linklink").href = globalurl;
document.getElementById("linklink").innerHTML = globalurl;
document.getElementById("urlinput").value = globalurl;
document.getElementById("textinput").value = globalurl;
qrcode = new QRCode(document.getElementById("qrcode"), {
text: globalurl,
width: codesquaresize,
height: codesquaresize,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
pngcode = document.getElementById("qrcode").getElementsByTagName("IMG")[0].src;
qrcode.makeCode(globalurl);
document.getElementById("mushroom").onclick = function(){
this.style.display = "none";
loadtable();
}
document.getElementById("reloadbutton").onclick =function(){
loadtable();
}
function loadtable(){
globalurl = document.getElementById("urlinput").value;
urltext = document.getElementById("textinput").value;
qrcode.makeCode(globalurl);
pngcode = document.getElementById("qrcode").getElementsByTagName("IMG")[0].src;
document.getElementById("linklink").href = globalurl;
document.getElementById("linklink").innerHTML = globalurl;
table.innerHTML = "";
for(var row = 0;row < 8;row++){
var newtr = document.createElement("TR");
table.appendChild(newtr);
for(var col = 0;col < 8;col++){
var newtd = document.createElement("TD");
newtr.appendChild(newtd);
var newimg = document.createElement("img");
newimg.style.width = "120px";
newimg.src = pngcode;
newtd.appendChild(newimg);
}
var newtr = document.createElement("TR");
table.appendChild(newtr);
for(var col = 0;col < 8;col++){
var newtd = document.createElement("TD");
newtr.appendChild(newtd);
newtd.innerHTML = urltext;
newtd.className = "urltext";
}
}
}
</script>
<style>
input{
border:solid;
}
body{
font-family:Comic Sans MS;
}
canvas,img{
}
#toplink{
position:absolute;
right:0px;
top:0px;
font-size:2em;
}
a{
font-family:Comic Sans MS;
color:#ff2cb4;
}
.urltext{
font-size:12px;
font-family:Comic Sans MS;
}
.button{
cursor:pointer;
text-align:center;
border:solid;
border-radius:3px;
}
.button:hover{
background-color:green;
}
.button:active{
background-color:yellow;
}
</style>
</body>
</html>