Reddit: collapse AutoModerator comments
Automatically collapses the boilerplate AutoModerator bot comments so they stop topping every thread.
Code to copy
// Collapse AutoModerator comments so they do not clutter threads
function collapseAutomod() {
document.querySelectorAll('shreddit-comment[author="AutoModerator"]').forEach(function (c) {
if (c.getAttribute('collapsed') === null && !c.dataset.jzCollapsed) {
c.setAttribute('collapsed', '');
c.dataset.jzCollapsed = '1';
}
});
}
collapseAutomod();
const obs = new MutationObserver(collapseAutomod);
obs.observe(document.documentElement, { childList: true, subtree: true });
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.