2025-07-25 09:22:58 -04:00
|
|
|
//
|
|
|
|
// Smooth scrolling when opening and closing the details element for value block
|
|
|
|
//
|
2025-07-24 11:33:38 -04:00
|
|
|
// Set expanded value block to a variable
|
2025-07-24 11:31:27 -04:00
|
|
|
const valueBlock = document.getElementById("value-expanded");
|
2025-07-24 12:25:15 -04:00
|
|
|
const bodyTop = document.getElementById("top");
|
2025-07-24 11:31:27 -04:00
|
|
|
|
2025-07-24 11:33:38 -04:00
|
|
|
// Watch for the details element to be toggled
|
2025-07-24 11:31:27 -04:00
|
|
|
document.querySelector('.value-block').addEventListener('toggle', function() {
|
|
|
|
if (this.open) {
|
2025-07-24 11:33:38 -04:00
|
|
|
// Scroll to contents of value block when it is opened
|
2025-07-24 11:31:27 -04:00
|
|
|
valueBlock.scrollIntoView({ behavior: "smooth" });
|
2025-07-24 12:25:15 -04:00
|
|
|
} else {
|
|
|
|
// Scroll to top of button list when value block is closed
|
|
|
|
bodyTop.scrollIntoView({ behavior: "smooth" });
|
|
|
|
}
|
2025-07-24 11:31:27 -04:00
|
|
|
});
|
2025-07-25 09:22:58 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// Copy crypto wallet addresses to clipboard when clicked
|
|
|
|
//
|
|
|
|
|
|
|
|
const btcadd = document.getElementById("btcwall").textContent;;
|
|
|
|
const ethadd = document.getElementById("ethwall").textContent;;
|
|
|
|
const dogeadd = document.getElementById("dogewall").textContent;;
|