]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
templates/base: generalise clipbboardjs initialisation
authorRoss Burton <ross.burton@arm.com>
Wed, 3 Jan 2024 17:44:54 +0000 (17:44 +0000)
committerStephen Finucane <stephenfinucane@hotmail.com>
Tue, 16 Jan 2024 18:38:49 +0000 (18:38 +0000)
Don't limit the clipboardjs hooking to button.btn-copy, as we may want
to use it on icons which are not buttons.

Signed-off-by: Ross Burton <ross.burton@arm.com>
templates/base.html

index b7e2d4f28f7badfc2781c95e423cce16d567ff70..747da592267cbfc2db78415307f4de5748e1a72e 100644 (file)
@@ -24,7 +24,7 @@
     <script src="{% static "js/js.cookie.min.js" %}"></script>
     <script>
       $(document).ready(function() {
-          new Clipboard(document.querySelectorAll('button.btn-copy'));
+          new Clipboard(document.querySelectorAll('.btn-copy'));
       });
     </script>
 {% block headers %}{% endblock %}