From 3921db6166e2da895257496bb76dd115556699d3 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 29 Mar 2025 11:12:53 +0300 Subject: init --- assets/helpers.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 assets/helpers.js (limited to 'assets/helpers.js') 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); +} -- cgit v1.2.3