Filter Archived Reddit Posts
Tired of stumbling across archived Reddit posts? DevTools Snippets can fix that! With a few lines of JavaScript, highlight and filter out archived content instantly. No extensions or extra features needed—just efficient problem-solving. Perfect for keeping your browsing frustration-free.
Clicking on a Reddit post only to find that it has been archived feels like a wasted effort. And to my knowledge there isn't a built-in way to filter archived posts. So DevTools Snippets to the rescue. That one voice in my head fought hard for trying to create another browser extension and/or other way to productize something, that led to considering adding another feature to NIM, but the sounder mind won out. Ultimately this is handled perfectly well with Snippets (if only there was a way to execute snippets without opening DevTools...?!)
The code snippet
Array.from(document.querySelectorAll('faceplate-tracker'))
.filter(t => JSON.parse(t.getAttribute('data-faceplate-tracking-context'))?.post?.archived)
.forEach(t => {
t.style.display = 'none';
});
Now that the snippet is added to DevTools, I can run it as needed, instantly highlighting archived posts. No extra extensions, no clutter—just a simple tool for a specific problem. It’s satisfying to solve the annoyance of clicking on dead posts with just a few lines of JavaScript.