Drafting a method for replacing the browser alert when copying a crypto wallet to the clipboard
This commit is contained in:
14
app.js
14
app.js
@@ -12,8 +12,6 @@ document.querySelector('.value-block').addEventListener('toggle', function() {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
valueBlock.scrollIntoView({ behavior: "smooth" });
|
valueBlock.scrollIntoView({ behavior: "smooth" });
|
||||||
}, 150);
|
}, 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);
|
}, 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);
|
||||||
|
//});
|
||||||
|
Reference in New Issue
Block a user