We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82b60dd commit 2c9044dCopy full SHA for 2c9044d
1 file changed
typescript-javascript/qrcodegen-input-demo.ts
@@ -45,13 +45,9 @@ namespace app {
45
// Show/hide rows based on bitmap/vector image output
46
const bitmapOutput: boolean = getInput("output-format-bitmap").checked;
47
const scaleRow : HTMLElement = getElem("scale-row");
48
- let download = getElem("download") as HTMLAnchorElement;
49
scaleRow.hidden = !bitmapOutput;
50
- if (bitmapOutput) {
51
- download.download = "qr-code.png";
52
- } else {
53
- download.download = "qr-code.svg";
54
- }
+ let download = getElem("download") as HTMLAnchorElement;
+ download.download = "qr-code." + (bitmapOutput ? "png" : "svg");
55
download.removeAttribute("href");
56
57
// Reset output images in case of early termination
0 commit comments