2015-11-06 23:48:06 +01:00
|
|
|
var original_link;
|
|
|
|
|
|
|
|
function select_text() {
|
|
|
|
$('.result-box').focus().select();
|
|
|
|
}
|
|
|
|
|
|
|
|
$('.result-box').click(select_text);
|
|
|
|
$('.result-box').change(function () {
|
|
|
|
$(this).val(original_link);
|
|
|
|
});
|
2016-02-20 01:13:50 +01:00
|
|
|
|
2017-10-22 03:01:49 +02:00
|
|
|
|
2017-10-22 04:01:15 +02:00
|
|
|
$('#generate-qr-code').click(function () {
|
|
|
|
var container = $('.qr-code-container');
|
2017-10-22 03:01:49 +02:00
|
|
|
container.empty();
|
|
|
|
new QRCode(container.get(0), {
|
2017-10-22 03:06:20 +02:00
|
|
|
text: original_link,
|
2017-10-22 03:01:49 +02:00
|
|
|
width: 280,
|
|
|
|
height: 280
|
|
|
|
});
|
2017-10-22 03:05:13 +02:00
|
|
|
container.find('img').attr('alt', original_link);
|
2017-10-22 03:01:49 +02:00
|
|
|
container.show();
|
|
|
|
});
|
|
|
|
|
2015-11-06 23:48:06 +01:00
|
|
|
$(function () {
|
|
|
|
original_link = $('.result-box').val();
|
|
|
|
select_text();
|
|
|
|
});
|