Website Summary Files Commits Branches @commit @diff @stats
path: root / views / archive / item.php
diff options
context:
space:
mode:
1 files changed, 8 insertions, 1 deletions
-rw-r--r--views/archive/item.php9
diff --git a/views/archive/item.php b/views/archive/item.php
index 5609a31..cff2f92 100644
--- a/views/archive/item.php
+++ b/views/archive/item.php
@@ -18,7 +18,14 @@
<input type="hidden" name="url" value="<?= $page->URL ?>">
<button><?php include $VIEWS_DIR . '/img/pdf-export.svg' ?></button>
</form>
- <span></span>
+ <button id="copy-to-clipboard" title="Copy to clipboard!"><?php include $VIEWS_DIR . '/img/link.svg' ?></button>
+ <script type="text/javascript">
+ const ctc = document.getElementById('copy-to-clipboard');
+ ctc.onclick = function () {
+ navigator.clipboard.writeText('<?= getenv("HTTP_HOST") . "/archives/" . $page->WID . "/index.php" ?>');
+ alert("Copied to clipboard!");
+ };
+ </script>
</section>
<section name="itemButton" hidden>
<form action="/list/add" method="GET">