diff --git a/apps/qrcode/custom.html b/apps/qrcode/custom.html index 039b47c23..5e29d7467 100644 --- a/apps/qrcode/custom.html +++ b/apps/qrcode/custom.html @@ -3,8 +3,8 @@
- - + +Additional options:
+ + + + + +Try your QR Code:
Click
@@ -101,14 +109,18 @@ if(document.getElementById("useWIFI").checked){ content = document.getElementById("ssid").value } + if(!(document.getElementById("description").value === "")){ + content = document.getElementById("description").value; + } var img = imageconverter.canvastoString(document.getElementsByTagName("canvas")[0],{mode:"1bit",output:"string",compression:true}); var app = `var img = ${img}; -var content = ${JSON.stringify(content)}; +${ document.getElementById("hideDescription").checked ? '' : `var content = ${JSON.stringify(content)};`} g.clear(1).setColor(1,1,1).setBgColor(0,0,0); g.fillRect(0,0,g.getWidth()-1,g.getHeight()-1); g.drawImage(img,(g.getWidth()-img[0])/2,(g.getHeight()-img[1])/2); -g.setFontAlign(0,0).setFont("6x8").setColor(0,0,0); -g.drawString(content,g.getWidth()/2,g.getHeight()-(g.getHeight()-img[1])/4); +${ document.getElementById("hideDescription").checked ? '' : `g.setFontAlign(0,0).setFont("6x8").setColor(0,0,0); +g.drawString(content,g.getWidth()/2,g.getHeight()-(g.getHeight()-img[1])/4)); +`} g.setColor(1,1,1); `; sendCustomizedApp({