mirror of
https://github.com/ivabus/www
synced 2024-11-25 09:05:07 +03:00
Added copy text in variable
This commit is contained in:
parent
dd66800c9f
commit
5ab8547076
1 changed files with 2 additions and 3 deletions
|
@ -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