diff --git a/index.html b/index.html index c229fa4..8e1b664 100644 --- a/index.html +++ b/index.html @@ -538,7 +538,12 @@

The transaction below has been generated and encoded. It can be broadcasted once it has been signed.


- +
+ + + + +

Size: 0 bytes

@@ -740,8 +745,13 @@
- - + +
+ + + + +

@@ -753,7 +763,12 @@ diff --git a/js/coinbin.js b/js/coinbin.js index 885be2e..d326f41 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -929,8 +929,18 @@ $(document).ready(function() { $(".qrcodeBtn").click(function(){ $("#qrcode").html(""); var thisbtn = $(this).parent().parent(); - var qrcode = new QRCode("qrcode"); - qrcode.makeCode("bitcoin:"+$('.address',thisbtn).val()); + + if($('textarea',$(this).closest('.input-group')).length){ + var qrcode = new QRCode("qrcode",{width:512,height:512}); + var qrstr = $('textarea',$(this).closest('.input-group')).val(); + if(qrstr.length > 2000){ + $("#qrcode").html("

Sorry the data is too long for the QR generator.

"); + } + }else{ + var qrcode = new QRCode("qrcode"); + var qrstr = "bitcoin:"+$('.address',thisbtn).val(); + } + qrcode.makeCode(qrstr); }); $('input[title!=""], abbr[title!=""]').tooltip({'placement':'bottom'});