Skip to content

Instantly share code, notes, and snippets.

@kherge
Last active March 4, 2025 16:20
Show Gist options
  • Save kherge/d20616dd35619a260baaba41414cd80b to your computer and use it in GitHub Desktop.
Save kherge/d20616dd35619a260baaba41414cd80b to your computer and use it in GitHub Desktop.
Bookmarket for Removing Hidden Reddit Posts

At least for me, Reddit has a problem actually hiding posts I have marked as hidden. With RES going away and Tamper Monkey being more difficult that this is worth, I created a simple bookmarklet to automatically remove hidden posts.

javascript:(function () {
if (!window.removeOnHidden) {
window.removeOnHidden = () => {
setTimeout(
() => {
document
.querySelectorAll('article:has(unpacking-overflow-menu[is-post-hidden])')
.forEach(element => element.remove());
document
.querySelectorAll('shreddit-ad-post')
.forEach(element => element.remove());
document
.querySelectorAll('hr + hr')
.forEach(element => element.remove());
document
.querySelectorAll('hr:has(+faceplate-loader)')
.forEach(element => element.remove());
},
500
);
};
window.removeOnHidden();
document.addEventListener('click', window.removeOnHidden);
console.info('Remove on hidden is registered.');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment