From 40e81afd57941b43ff5c8ba3bd792ed8bb353801 Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Fri, 30 Dec 2022 01:46:54 +0100 Subject: [PATCH] Add copyToClipboard() --- get_online_session_communities.php | 4 +++- output/script.js | 3 +++ output/styles.css | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/get_online_session_communities.php b/get_online_session_communities.php index 2e47606..0cc1e31 100644 --- a/get_online_session_communities.php +++ b/get_online_session_communities.php @@ -583,7 +583,9 @@ " " . $content["description"] . "" . PHP_EOL . " " . $active_users . "" . PHP_EOL . " " . $preview_link . "" . PHP_EOL . - " " . substr($join_link, 0, 32) . "..." . PHP_EOL . + " " . substr($join_link, 0, 32) . "..." . PHP_EOL . + " " . PHP_EOL . + " " . PHP_EOL . " " . PHP_EOL; $table_lines[] = $line; } diff --git a/output/script.js b/output/script.js index e69de29..76a076f 100644 --- a/output/script.js +++ b/output/script.js @@ -0,0 +1,3 @@ +function copyToClipboard(text) { + navigator.clipboard.writeText(text); +} diff --git a/output/styles.css b/output/styles.css index 4d71daf..71b7c5e 100644 --- a/output/styles.css +++ b/output/styles.css @@ -12,5 +12,7 @@ #th_join_url { width:18%; } .td_join_url { font-family: monospace; } +.copy_button { } + #td_summary { text-align: center; } #td_last_checked { text-align: center; }