Ubivectel,
document.addEventListener("click", (event) => {
let target = event.target;
if (target = target.closest('.K_copy')) {
let top = event.pageY + 10 + 'px';
let left = event.pageX + 10 + 'px';
target = target.closest('.KIDE_msg_top')
let clon = target.cloneNode(true);
clon.querySelectorAll(".KIDE_quote").forEach(el => el.remove());
let text = clon.textContent;
navigator.clipboard.writeText(text);
$("#K_copy").css({top, left}).show(400, function () {
setTimeout(function () {
$("#K_copy").hide(300);
}, 800);
});
}
});
далее сами уточняйте