From 97811c294cc2b89b2923c206cc918a5c9a4f9fc9 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Thu, 15 Dec 2016 11:39:44 +1100 Subject: QR code warns for scanners that keep history --- src/index.html | 9 +++++++-- src/js/index.js | 8 ++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/index.html b/src/index.html index 10fd62a..71df82a 100644 --- a/src/index.html +++ b/src/index.html @@ -92,8 +92,10 @@ .qr-image { margin: 5px; } - .qr-hint { + .qr-hint, + .qr-warning { padding: 2px; + max-width: 150px; } .more-info { cursor: help; @@ -623,7 +625,10 @@
diff --git a/src/js/index.js b/src/js/index.js index 748a2ba..04559d1 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -67,6 +67,7 @@ DOM.privateKeyToggle = $(".private-key-toggle"); DOM.languages = $(".languages a"); DOM.qrContainer = $(".qr-container"); + DOM.qrHider = DOM.qrContainer.find(".qr-hider"); DOM.qrImage = DOM.qrContainer.find(".qr-image"); DOM.qrHint = DOM.qrContainer.find(".qr-hint"); DOM.showQrEls = $("[data-show-qr]"); @@ -946,7 +947,10 @@ var size = 130; DOM.qrImage.qrcode({width: size, height: size, text: content}); if (!showQr) { - DOM.qrImage.addClass("hidden"); + DOM.qrHider.addClass("hidden"); + } + else { + DOM.qrHider.removeClass("hidden"); } DOM.qrContainer.removeClass("hidden"); } @@ -959,7 +963,7 @@ function toggleQr() { showQr = !showQr; - DOM.qrImage.toggleClass("hidden"); + DOM.qrHider.toggleClass("hidden"); DOM.qrHint.toggleClass("hidden"); } -- cgit v1.2.3