diff --git a/application.coffee b/application.coffee index 215c470..e4f436d 100644 --- a/application.coffee +++ b/application.coffee @@ -3,7 +3,7 @@ $ -> $('#triggerCreate').bind 'click', generateQRCode $(window).bind 'hashchange', -> text = window.location.hash.substring 1 - $('textarea').val text + $('textarea').val decodeURIComponent(text) generateQRCode() $('a', '#download').bind 'click', -> window.location.href = $('canvas', '#qrarea')[0].toDataURL('image/png').replace('image/png', 'image/octet-stream') diff --git a/application.js b/application.js index c40779e..d629826 100644 --- a/application.js +++ b/application.js @@ -1,3 +1,4 @@ +// Generated by CoffeeScript 1.6.3 (function() { var generateQRCode; @@ -7,13 +8,15 @@ $(window).bind('hashchange', function() { var text; text = window.location.hash.substring(1); - $('textarea').val(text); + $('textarea').val(decodeURIComponent(text)); return generateQRCode(); }); $('a', '#download').bind('click', function() { return window.location.href = $('canvas', '#qrarea')[0].toDataURL('image/png').replace('image/png', 'image/octet-stream'); }); - if (window.location.hash) $(window).trigger('hashchange'); + if (window.location.hash) { + $(window).trigger('hashchange'); + } return generateQRCode(); });