Skip to content

Instantly share code, notes, and snippets.

Created January 3, 2023 16:03
What would you like to do?
Hiding Twitter ads (January 2023)

Hiding Twitter ads (January 2023)

Ads on post-Elon Twitter are becoming more and more obnoxious. You can hide them if you use a content blocking extension, such as the awesome uBlock Origin.

By targeting the little icon that appears near the "Sponsored" label, the filter works on Twitter in every language.

Simply add the following rule to your ad-blocker:

! 2023-01-02>div>div>*:has(path[d='M19.498 3h-15c-1.381 0-2.5 1.12-2.5 2.5v13c0 1.38 1.119 2.5 2.5 2.5h15c1.381 0 2.5-1.12 2.5-2.5v-13c0-1.38-1.119-2.5-2.5-2.5zm-3.502 12h-2v-3.59l-5.293 5.3-1.414-1.42L12.581 10H8.996V8h7v7z'])

The idea was inspired by a discussion here on GitHub:

ryanckulp/twitter_ad_blocker#17 (comment)

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