Skip to content

Instantly share code, notes, and snippets.

@boutzamat
Created July 25, 2025 08:56
Show Gist options
  • Save boutzamat/2d4e9d311d543640b472b7ec6b250757 to your computer and use it in GitHub Desktop.
Save boutzamat/2d4e9d311d543640b472b7ec6b250757 to your computer and use it in GitHub Desktop.
CSS to hide ads on Facebook
.x1lliihq:has([data-ad-rendering-role="cta-"]),
.x1pha0wt.x78zum5.x1r8uery.xdt5ytf.x1iyjqo2.x1qughib,
.x1lliihq div:has(>span>div>div>[attributionsrc]),
.x1y1aw1k > div:has([aria-label="Annoncør"])
{
display:none!important;
}
@boutzamat
Copy link
Author

Using User JS and CSS Chrome extension with the above CSS to hide Facebooks annoying ads.

Set the URL pattern to https://www.facebook.com/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment