Skip to content

Instantly share code, notes, and snippets.

@FelixWolf
Last active November 1, 2020 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FelixWolf/383a3e0f61e66834b16ac927c6455486 to your computer and use it in GitHub Desktop.
Save FelixWolf/383a3e0f61e66834b16ac927c6455486 to your computer and use it in GitHub Desktop.
Taking the aggressive approach to blocking ads on facebook

How to prevent a big "inclusive" corperate entity from breaking ad blocking: Make them have to choose between money and being inclusivity. Also known as, abusing the aria field.

Step 1. Make a massive div tree selector to block ads

##div[data-pagelet]:has(> div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > span > span > a[aria-label="Sponsored"])

Step 2. Make a massive div tree selector to block the annoying "people you may know" thing that shows me the opposite of people I know.

##div[data-pagelet]:has(> div > div > div > div > div > div > div > div > div > div > div > div > div > div > a[aria-label="See All"][href="/friends/"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment