-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (119 loc) · 4.08 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
117
118
119
120
121
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Get QR Code - QR Code Generator</title>
<meta name="description" content="JavaScript based QR Code generator"/>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.2/cosmo/bootstrap.min.css"/>
</head>
<body>
<div class="container">
<header class="page-header">
<h1>Get QR Code</h1>
<p class="lead">
JavaScript based QR Code Generator
</p>
</header>
<form role="form">
<div class="form-group has-feedback">
<label class="control-label" for="text">Enter text</label>
<textarea id="text" rows="10" class="form-control" placeholder="Enter text"></textarea>
<a href="#" class="form-control-feedback link-of-text" title="Link of this text">
<span class="glyphicon glyphicon-link"></span>
</a>
</div>
</form>
<div class="pull-right">
<div class="fb-like" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
</div>
<div class="pull-right">
<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
</div>
<p class="lead">QR Code images</p>
<div class="alert alert-danger qrcode-error" style="display: none;"></div>
<p>
128x128
<div class="qrcode thumbnail" style="width: 128px;"></div>
</p>
<p>
256x256
<div class="qrcode thumbnail" style="width: 256px;"></div>
</p>
<p>
512x512
<div class="qrcode thumbnail" style="width: 512px;"></div>
</p>
<p>
1024x1024
<div class="qrcode thumbnail" style="width: 1024px;"></div>
</p>
<p>
Get QR Code © hidetake.org, 2014.
Thanks to <a href="https://github.com/davidshimjs/qrcodejs">davidshimjs's QRCode.js</a>.
</p>
</div>
</body>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '1470096443269611',
xfbml : true,
version : 'v2.1'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<script src="//code.jquery.com/jquery-3.1.0.min.js"></script>
<script src="qrcode.js"></script>
<script type="text/javascript">
$(function () {
$('.qrcode').each(function () {
$(this).data('qrcode', new QRCode(this, {
width: $(this).width(),
height: $(this).width(),
correctLevel: QRCode.CorrectLevel.M
}));
});
$('#text').change(function () {
$('.qrcode').each(function () {
try {
$('.qrcode-error').hide();
$(this).show().data('qrcode').makeCode($('#text').val());
} catch (e) {
$('.qrcode-error').show().text(e.message);
$(this).hide();
}
});
$('.link-of-text').attr('href', '#' + $('#text').val());
})
.keydown(function () {
var original = $(this).val();
if ($(this).data('timer')) {
window.clearTimeout($(this).data('timer'));
}
$(this).data('timer', window.setTimeout(function () {
if ($(this).val() != original) {
$(this).change();
}
}.bind(this), 100));
})
.val(location.hash.substring(1) || location.href)
.change();
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3232369-2', 'auto');
ga('send', 'pageview');
</script>
</html>