-
Notifications
You must be signed in to change notification settings - Fork 13
/
BTCQRMaker.html
144 lines (109 loc) · 3.16 KB
/
BTCQRMaker.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>QR Code Generator for Open Bitcoin</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<link href="css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 20px;
padding-bottom: 40px;
}
/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow > hr {
margin: 30px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 60px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 72px;
line-height: 1;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
</style>
<script type="text/javascript" src="js/qrcode-filemaker.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/filesaver.js"></script>
<script type="text/javascript" src="js/baseconverter.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-narrow">
<div class="masthead">
<h3 class="muted">Open Bitcoin ATM</h3>
</div>
<hr>
<div class="jumbotron">
<h1>QR Code Maker</h1>
<br>
<br>
<div id="qrcode"></div>
<br>
<br>
<div>176 x 176 pixel png for Open Bitcoin ATM Thermal Printer</div>
<br>
<br>
<br>
<input type="text" id="privKey" style="width:500px; name="input1" class="span3" placeholder="Copy and paste wallet import format private key here...">
<br>
<input type="text" id="btcFileName" style="width:200px; name="input2" class="span3" placeholder="File Name: BTC_#.btc">
<br>
<div>
<button type="button" class="btn btn-large btn-success" onclick="makeCode()">Make QR Code and Thermal Printer File</button>
</div>
</div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
width : 176,
height : 176,
colorDark : "#000000",
colorLight : "#ffffff",
correcLevel : QRCode.CorrectLevel.H
});
/*
----------------------------------------
http://jsfiddle.net/UselessCode/qm5AG/
----------------------------------------
*/
function createFile(){
var textFile = null,
makeTextFile = function (text) {
var data = new Blob([text], {type: 'text/plain'});
// If we are replacing a previously generated file we need to
// manually revoke the object URL to avoid memory leaks.
if (textFile !== null) {
window.URL.revokeObjectURL(textFile);
}
textFile = window.URL.createObjectURL(data);
// returns a URL you can use as an href
return textFile;
};
}
function makeCode () {
var pKey = document.getElementById("privKey");
if (!pKey.value) {
pKey.focus();
return;
}
qrcode.makeCode(pKey.value);
}
</script>
</body>