diff options
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r-- | web/template/pkg_details.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index c6bb32d8..047de9a7 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -308,14 +308,10 @@ endif; </div> <script> -$(document).ready(function() { - $('.copy').click(function(e) { - var tmp = $("<input>"); - $("body").append(tmp); - tmp.val($(this).text()).select(); - document.execCommand("copy"); - tmp.remove(); +document.addEventListener('DOMContentLoaded', function() { + document.querySelector('.copy').addEventListener('click', function(e) { e.preventDefault(); + navigator.clipboard.writeText(event.target.text); }); }); </script> |