Drafting a method for replacing the browser alert when copying a crypto wallet to the clipboard

This commit is contained in:
2025-07-26 22:42:07 -04:00
parent c4cc00cc46
commit 6008255509

14
app.js
View File

@@ -12,8 +12,6 @@ document.querySelector('.value-block').addEventListener('toggle', function() {
setTimeout(() => {
valueBlock.scrollIntoView({ behavior: "smooth" });
}, 150);
} else {
// Scroll to top of button list when value block is closed
}
});
@@ -122,3 +120,15 @@ document.querySelector("#doge-qr-link a").addEventListener("click", function(){
}, 150);
}
});
// An attempt at replacing the browser alert with something nicer
// Watch for click on BTC wallet address
//document.getElementById("btcwall").addEventListener("click", function(){
// // Copy BTC address to clipboard
// navigator.clipboard.writeText(btcadd);
// // Display alert to confirm the address was added to clipboard
// btcwall.insertAdjacentHTML("afterend", "<span class=\"crypto-js-copy\" id=\"btc-js-copy\"><br>Copied</span>");
// setTimeout(() => {
// document.querySelector("#btc-js-copy").remove();
// }, 2000);
//});