fix: regression in cite copy button

Button action started copying wrapping HTML tags too
This commit is contained in:
Geo 2022-04-20 15:40:21 +01:00
commit 1ed86e35ab

View file

@ -149,7 +149,7 @@ document.addEventListener('DOMContentLoaded', function () {
$('.js-copy-cite').click(function (e) {
e.preventDefault();
// Get text to copy.
let citation = document.querySelector('#modal .modal-body').innerHTML;
let citation = document.querySelector('#modal .modal-body code').innerHTML;
navigator.clipboard
.writeText(citation)
.then(function () {