diff options
| author | Grail Finder <wohilas@gmail.com> | 2025-03-29 11:12:53 +0300 | 
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2025-03-29 11:12:53 +0300 | 
| commit | 3921db6166e2da895257496bb76dd115556699d3 (patch) | |
| tree | 1be4f739121761085f69cb7706c60dbbe98a93e9 /assets/helpers.js | |
init
Diffstat (limited to 'assets/helpers.js')
| -rw-r--r-- | assets/helpers.js | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/assets/helpers.js b/assets/helpers.js new file mode 100644 index 0000000..9d6749c --- /dev/null +++ b/assets/helpers.js @@ -0,0 +1,14 @@ +function copyText() { +  // Get the text field +  var roomLink = document.getElementById("roomlink"); + +  // Select the text field +  roomLink.select(); +  roomLink.setSelectionRange(0, 99999); // For mobile devices + +   // Copy the text inside the text field +  navigator.clipboard.writeText(roomLink.value); + +  // Alert the copied text +  alert("Copied the text: " + roomLink.value); +}  | 
