From 5f2eb541052f6f6f02d5bc4320f9c19e21c6f59f Mon Sep 17 00:00:00 2001 From: GrailFinder Date: Tue, 19 Mar 2024 07:39:31 +0300 Subject: Feat: template use examples --- 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