diff options
author | GrailFinder <wohilas@gmail.com> | 2024-03-19 07:39:31 +0300 |
---|---|---|
committer | GrailFinder <wohilas@gmail.com> | 2024-03-19 07:39:31 +0300 |
commit | 5f2eb541052f6f6f02d5bc4320f9c19e21c6f59f (patch) | |
tree | 985ae1ac1db4f19d132c16cdbf84e300edce6b6d /assets/helpers.js | |
parent | bfb7942343bc08a7424f144f9799a9b547d6f607 (diff) |
Feat: template use examples
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); +} |