mirror of
https://github.com/ivabus/www
synced 2024-11-10 17:35:16 +03:00
'copy' => 'copied!' onClick
This commit is contained in:
parent
fdd6de57b6
commit
21aace98da
|
@ -29,7 +29,7 @@
|
|||
<input class="one-liner" type="text" value="$ sh <(curl tea.xyz) install {{- .Title -}}" id="myInput" readonly>
|
||||
|
||||
<!-- The button used to copy the text -->
|
||||
<button class="clipboard-copy" onclick="myFunction()" data-bs-toggle="modal" data-bs-target="#exampleModal"><i class="icon-clipboard"></i></button>
|
||||
<button class="clipboard-copy" id="copy-icon" onclick="myFunction()" data-bs-toggle="modal" data-bs-target="#exampleModal">copy</button>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
@ -167,6 +167,8 @@
|
|||
|
||||
/* Alert the copied text
|
||||
alert("Copied " + copyText.value + " to clipboard");*/
|
||||
|
||||
document.getElementById("copy-icon").innerHTML = "copied!";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<input class="one-liner" type="text" value="$ sh <(curl tea.xyz) install {{- .Title -}}" id="myInput" readonly>
|
||||
|
||||
<!-- The button used to copy the text -->
|
||||
<button class="clipboard-copy" onclick="myFunction()"><i class="icon-clipboard"></i></button>
|
||||
<button class="clipboard-copy" onclick="myFunction()" id="copy-icon"><i class="icon-clipboard"></i></button>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
@ -66,6 +66,9 @@
|
|||
|
||||
// Alert the copied text
|
||||
alert("Copied " + copyText.value + " to clipboard");
|
||||
|
||||
// Copy icon
|
||||
document.getElementById("copy-icon").innerHTML = "copied!";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue