mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 02:14:21 +00:00
fix: regression in cite copy button
Button action started copying wrapping HTML tags too
This commit is contained in:
1 parent
b026701dd6
commit
1ed86e35ab
1 file changed
+1
-1
@@ -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 () {
|
||||
|
||||
Reference in new issue
Block a user