added cid quotelinks

This commit is contained in:
plebbitor
2023-04-13 17:08:35 +02:00
parent d1f0fcd10c
commit bb8c6cc8f3
6 changed files with 54 additions and 69 deletions
+12
View File
@@ -0,0 +1,12 @@
function handleQuoteClick(reply) {
const cid = reply.shortCid;
const targetElement = [...document.querySelectorAll('.post-reply')]
.find(el => el.innerHTML.includes(cid));
if (targetElement) {
targetElement.scrollIntoView({ behavior: "instant" });
} else {
console.log('Could not find target element');
}
};
export default handleQuoteClick;