2025-06-23 20:38:28 +01:00
|
|
|
document.addEventListener('readystatechange', () => {
|
2025-05-21 18:39:33 +01:00
|
|
|
document.querySelectorAll('.comment-hover').forEach((/** @type {HTMLDivElement} */ comment) => {
|
|
|
|
/** @type {HTMLLinkElement} */
|
|
|
|
const commentBody = comment.querySelector('a.comment-body');
|
|
|
|
|
|
|
|
comment.querySelectorAll('a').forEach((/** @type {HTMLLinkElement} */ element) => {
|
|
|
|
element.addEventListener('click', event => {
|
|
|
|
event.stopPropagation();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
comment.addEventListener('click', () => {
|
|
|
|
commentBody.click();
|
|
|
|
});
|
|
|
|
|
|
|
|
comment.style.cursor = 'pointer';
|
|
|
|
comment.role = 'link';
|
|
|
|
});
|
2025-06-23 20:38:28 +01:00
|
|
|
|
|
|
|
document.getElementById('blog-copy-link').addEventListener('click', event => {
|
|
|
|
event.preventDefault();
|
|
|
|
if (navigator.clipboard === undefined) {
|
|
|
|
console.error("clipboard is not supported by this browser!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
navigator.clipboard.writeText(location.protocol + "//" + location.host + location.pathname);
|
|
|
|
});
|
2025-05-21 18:39:33 +01:00
|
|
|
});
|