From 994cd8ed1803f1f322e47617da7ebd826b344bf4 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 21 Sep 2017 19:51:56 +0200 Subject: [PATCH] qr tweaks --- _src/_assets/js/_modals.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/_src/_assets/js/_modals.js b/_src/_assets/js/_modals.js index e72cedb8..4c07f836 100644 --- a/_src/_assets/js/_modals.js +++ b/_src/_assets/js/_modals.js @@ -58,7 +58,7 @@ const krlcModals = (() => { // eslint-disable-line no-unused-vars ` }) - // Generate QR code + // Generate QR codes const qrBtc = new QRious({ element: document.getElementById('qr-btc'), value: btcAddress @@ -69,12 +69,14 @@ const krlcModals = (() => { // eslint-disable-line no-unused-vars value: ethAddress }) - qrBtc.backgroundAlpha = 0 - qrEth.backgroundAlpha = 0 - qrBtc.foreground = '#6b7f88' - qrEth.foreground = '#6b7f88' - qrBtc.size = 160 - qrEth.size = 160 + const qrOptions = { + backgroundAlpha: 0, + foreground: '#6b7f88', + size: 160 + } + + qrBtc.set(qrOptions) + qrEth.set(qrOptions) // Clipboard button const clipboard = new Clipboard('.btn')