for (let value of document.querySelectorAll('.first a.bylink.comments')) { let href = value.closest('.top-matter').querySelector('.title a.title.may-blank').href; if (href != value.href && ( href.startsWith('https://www.reddit.com/') || href.startsWith('https://v.redd.it')) ) { console.log (href, value.href); value.closest('.top-matter').querySelector('.title a.title.may-blank').href = value.href; } }
First one is also dynamic, so next ~day its different breaking one of the fundamental features of HTML - :visited link color.