Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hide all Pages from newsfeed
// I wrote this because I'm fed up with all the spam memes and cheesy quotes people share on Facebook.
// 1. Automate clicking the story action buttons to gather the URIs to hide those pages
Array.prototype.map.call(document.querySelectorAll(`[data-testid='post_chevron_button']`),a=>a.click())
// 2. Hide it.
Array.prototype.filter.call(document.querySelectorAll(`a[data-feed-option-name='UNSUBSCRIBE_ATTACHED_STORY_ACTOR']`),a=>/Hide all from/.test(a.querySelector('._2ezu').title)).map(a=>new AsyncRequest(a.getAttribute('ajaxify')).send())
@gauthamzz

This comment has been minimized.

Copy link

gauthamzz commented Apr 14, 2018

Does it stay forever?
If it does, how do i make it come back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.