Default placeholder value sans 'https'

This commit is contained in:
Thomas Smith 2022-11-25 09:26:02 -05:00
parent 49f71a65d5
commit dd66800c9f

View file

@ -1,6 +1,6 @@
<hr> <hr>
<div class="row button-container" onclick="myFunction()" style="display:flex; justify-content:space-between;"> <div class="row button-container" onclick="myFunction()" style="display:flex; justify-content:space-between;">
<input class="one-liner" type="text" value="sh <(curl https://tea.xyz)" id="shortcodeCopy" readonly> <input class="one-liner" type="text" value="sh <(curl tea.xyz)" id="shortcodeCopy" readonly>
<!-- The button used to copy the text --> <!-- The button used to copy the text -->
@ -182,6 +182,8 @@
// Get the text field // Get the text field
var copyText = document.getElementById("shortcodeCopy"); var copyText = document.getElementById("shortcodeCopy");
copyText.value = "sh <(curl https://tea.xyz)";
// Select the text field // Select the text field
copyText.select(); copyText.select();
copyText.setSelectionRange(0, 99999); // For mobile devices copyText.setSelectionRange(0, 99999); // For mobile devices
@ -189,7 +191,6 @@
// Copy the text inside the text field // Copy the text inside the text field
navigator.clipboard.writeText(copyText.value); navigator.clipboard.writeText(copyText.value);
document.getElementById("liveToastBtn").innerHTML = "copied!"; document.getElementById("liveToastBtn").innerHTML = "copied!";
} }