Verified Commit 0f0a2f18 authored by Kevin Morris's avatar Kevin Morris
Browse files

Merge branch 'copy-fix'

parents f11e8de2 5045f0f3
......@@ -160,4 +160,3 @@
</table>
<script type="text/javascript" src="/static/js/copy.js"></script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('.copy').addEventListener('click', function(e) {
let elements = document.querySelectorAll('.copy');
elements.forEach(function(el) {
el.addEventListener('click', function(e) {
e.preventDefault();
navigator.clipboard.writeText(event.target.text);
navigator.clipboard.writeText(e.target.text);
});
});
});
......@@ -309,9 +309,9 @@ endif;
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('.copy').addEventListener('click', function(e) {
document.querySelectorAll('.copy').addEventListener('click', function(e) {
e.preventDefault();
navigator.clipboard.writeText(event.target.text);
navigator.clipboard.writeText(e.target.text);
});
});
</script>
......@@ -138,9 +138,9 @@ endif;
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('.copy').addEventListener('click', function(e) {
document.querySelectorAll('.copy').addEventListener('click', function(e) {
e.preventDefault();
navigator.clipboard.writeText(event.target.text);
navigator.clipboard.writeText(e.target.text);
});
});
</script>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment