diff --git a/templates/partials/packages/details.html b/templates/partials/packages/details.html index 22d519b9..e0eda54c 100644 --- a/templates/partials/packages/details.html +++ b/templates/partials/packages/details.html @@ -160,4 +160,3 @@ - diff --git a/web/html/js/copy.js b/web/html/js/copy.js index f46299b3..3b659270 100644 --- a/web/html/js/copy.js +++ b/web/html/js/copy.js @@ -1,6 +1,9 @@ document.addEventListener('DOMContentLoaded', function() { - document.querySelector('.copy').addEventListener('click', function(e) { - e.preventDefault(); - navigator.clipboard.writeText(event.target.text); - }); + let elements = document.querySelectorAll('.copy'); + elements.forEach(function(el) { + el.addEventListener('click', function(e) { + e.preventDefault(); + navigator.clipboard.writeText(e.target.text); + }); + }); }); diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 047de9a7..25d85b78 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -309,9 +309,9 @@ endif; diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index 35ad217a..bde29c1c 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -138,9 +138,9 @@ endif;