mirror of
https://github.com/ivabus/www
synced 2024-11-10 05:25:14 +03:00
Added copy text in variable
This commit is contained in:
parent
dd66800c9f
commit
5ab8547076
|
@ -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!";
|
||||
|
||||
|
|
Loading…
Reference in a new issue