pull down to refresh
reply
reply
reply
reply
reply
reply
You probably told it to run after hydration, and that’s what it did, haha
But when we don’t remove the node, we don’t interfere with hydration, so we don’t need to run it after hydration.
Edit: But sounded like it was still broken after the first prompt, so you prompted it again, and that contained the actual, inspiring fix via CSS haha
reply
Fixes courtesy of:
runAfterHydration: GPT, Claude, Gemini and GLM (all said the same, lol)node.style = "visibility: hidden"instead ofnode.remove(): Opti, because the removal gave me errors on comment.window.addEventListener('load', () => { function runAfterHydration(callback) { requestAnimationFrame(() => { requestAnimationFrame(callback); }); } runAfterHydration(() => { function removeCollapsedComments() { document .querySelectorAll('div[class*="comment_collapsed"]') .forEach(node => { if (node.textContent.startsWith("reply from someone you muted")) { node.style = "visibility: hidden"; } }); } removeCollapsedComments(); const observer = new MutationObserver(removeCollapsedComments); observer.observe(document.body, { childList: true, subtree: true }); }); });