Added copy text in variable

This commit is contained in:
Thomas Smith 2022-11-25 09:45:04 -05:00
parent dd66800c9f
commit 5ab8547076

View file

@ -181,15 +181,14 @@
function changeCopied() {
// Get the text field
var copyText = document.getElementById("shortcodeCopy");
copyText.value = "sh <(curl https://tea.xyz)";
var copiedValue = "sh <(curl https://tea.xyz)";
// Select the text field
copyText.select();
copyText.setSelectionRange(0, 99999); // For mobile devices
// Copy the text inside the text field
navigator.clipboard.writeText(copyText.value);
navigator.clipboard.writeText(copiedValue);
document.getElementById("liveToastBtn").innerHTML = "copied!";