diff options
Diffstat (limited to 'web/template/pkgbase_details.php')
-rw-r--r-- | web/template/pkgbase_details.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index a6857c4e..35ad217a 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -137,14 +137,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> |