diff --git a/html/static/js/copy.js b/html/static/js/copy.js new file mode 100644 index 0000000..3e44d04 --- /dev/null +++ b/html/static/js/copy.js @@ -0,0 +1,6 @@ +function copy(selector) { + let element = document.querySelector(selector); + navigator.clipboard.writeText(element.innerHTML); + + return false; +} \ No newline at end of file diff --git a/templates/layout/bottom.php b/templates/layout/bottom.php index 308b1d0..d790ce8 100644 --- a/templates/layout/bottom.php +++ b/templates/layout/bottom.php @@ -1,2 +1,3 @@ + diff --git a/templates/pages/fragments/creation-successful.php b/templates/pages/fragments/creation-successful.php index 75fe3c3..e3b5128 100644 --- a/templates/pages/fragments/creation-successful.php +++ b/templates/pages/fragments/creation-successful.php @@ -1,5 +1,6 @@
" target="_blank"> + copy
Click here to create a new link.