From 0344087136d68b5f776d6b523c52ebcec953d3ed Mon Sep 17 00:00:00 2001 From: Mike Rockwell Date: Sat, 26 Jul 2025 16:34:56 -0400 Subject: [PATCH] Add display of QR codes when link is clicked --- app.js | 30 +++++++++++++++++++++--------- index.html | 6 +++--- style.css | 8 ++++++++ 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/app.js b/app.js index 35c7dfb..5fca775 100644 --- a/app.js +++ b/app.js @@ -64,27 +64,39 @@ document.querySelector("#doge-qr-link a").addEventListener("click", function(eve // Watch for click on BTC QR code link document.querySelector("#btc-qr-link a").addEventListener("click", function(){ - console.log('BTC QR Clicked'); // Hide all other QR codes - + if (document.contains(document.querySelector("#eth-js-qr"))) { + document.querySelector("#eth-js-qr").remove(); + } + if (document.contains(document.querySelector("#doge-js-qr"))) { + document.querySelector("#doge-js-qr").remove(); + } // Display BTC QR code - + document.querySelector("#btcwall").insertAdjacentHTML("afterend", ""); }); // Watch for click on ETH QR code link document.querySelector("#eth-qr-link a").addEventListener("click", function(){ - console.log('ETH QR Clicked'); // Hide all other QR codes - + if (document.contains(document.querySelector("#btc-js-qr"))) { + document.querySelector("#btc-js-qr").remove(); + } + if (document.contains(document.querySelector("#doge-js-qr"))) { + document.querySelector("#doge-js-qr").remove(); + } // Display ETH QR code - + document.querySelector("#ethwall").insertAdjacentHTML("afterend", ""); }); // Watch for click on DOGE QR code link document.querySelector("#doge-qr-link a").addEventListener("click", function(){ - console.log('DOGE QR Clicked'); // Hide all other QR codes - + if (document.contains(document.querySelector("#btc-js-qr"))) { + document.querySelector("#btc-js-qr").remove(); + } + if (document.contains(document.querySelector("#eth-js-qr"))) { + document.querySelector("#eth-js-qr").remove(); + } // Display DOGE QR code - + document.querySelector("#dogewall").insertAdjacentHTML("afterend", ""); }); diff --git a/index.html b/index.html index a869b56..4354d26 100644 --- a/index.html +++ b/index.html @@ -74,9 +74,9 @@ PayPal diff --git a/style.css b/style.css index 5dd1d93..f5d1070 100644 --- a/style.css +++ b/style.css @@ -613,3 +613,11 @@ details:not([open]) { p.value-explainer { margin-top: 16px; } + +details.value-block ul li { + margin-bottom:32px +} +details.value-block ul li img { + margin-left:auto; + margin-right:auto; +}