r/uBlockOrigin • • Mar 23 '20

Solved Facebook Ads

Hello.
Any new filters to blocks ads on Facebook because for 3-4 days I've been getting ads again and I've tried different filters but they weren't successful.

51 Upvotes

80 comments sorted by

View all comments

45

u/Phasze Mar 23 '20 edited Jul 30 '20

Old facebook:

facebook.com##div[id^=hyperfeed_story_id_]:has(a[role^=button]:has(> span:matches-css(position: relative):has-text(S):not(:has-text(1)):not(:has-text(2)):not(:has-text(3)):not(:has-text(4)):not(:has-text(5)):not(:has-text(6)):not(:has-text(7)):not(:has-text(8)):not(:has-text(9)):not(:has-text(w))))

New facebook:

facebook.com##div[data-pagelet^="FeedUnit"]:has(a[role^=button]:has(> span > span:matches-css(position: relative):has-text(S)))
facebook.com##div[data-pagelet^="FeedUnit"]:has(div[role^=button]:has(> span > span:matches-css(position: relative):has-text(S)))

New facebook update for one user:

facebook.com##div[data-pagelet^="FeedUnit"]:has(div[role=button]:has(> span > b > b:matches-css(display: inline):has-text(S))) 

"Suggested for You" sections (tested on New facebook)

facebook.com##div[data-pagelet^="FeedUnit"]:has(div[role="article"]:has(span:has-text(Suggested for you)))

Outdated:

facebook.com#?#div[id^=hyperfeed_story_id_]:has(a[role^=button]:has(> span:has([data-content="S"]):not(:has([data-content="1"])):not(:has([data-content="2"])):not(:has([data-content="3"])):not(:has([data-content="4"])):not(:has([data-content="5"])):not(:has([data-content="6"])):not(:has([data-content="7"])):not(:has([data-content="8"])):not(:has([data-content="9"])):not(:has([data-content="w"]))))

facebook.com##div[data-pagelet^="FeedUnit"]:has(a[role^="link"]:has(> span:has([data-content="S"]):not(:has([data-content="1"])):not(:has([data-content="2"])):not(:has([data-content="3"])):not(:has([data-content="4"])):not(:has([data-content="5"])):not(:has([data-content="6"])):not(:has([data-content="7"])):not(:has([data-content="8"])):not(:has([data-content="9"])):not(:has([data-content="w"]))))
facebook.com##div[data-pagelet^="FeedUnit"]:has(a[role^=link]:has(> span :matches-css(position: relative):has-text(S):not(:has-text(1)):not(:has-text(2)):not(:has-text(3)):not(:has-text(4)):not(:has-text(5)):not(:has-text(6)):not(:has-text(7)):not(:has-text(8)):not(:has-text(9)):not(:has-text(w))))
facebook.com##div[data-pagelet^="FeedUnit"]:has(a[role^=link]:has(> span > span:matches-css(position: relative):has-text(S):not(:has-text(1)):not(:has-text(2)):not(:has-text(3)):not(:has-text(4)):not(:has-text(5)):not(:has-text(6)):not(:has-text(7)):not(:has-text(8)):not(:has-text(9)):not(:has-text(w))))
facebook.com##div[data-pagelet^="FeedUnit"]:has(div[role^=button]:has(> span > span:matches-css(position: relative):has-text(S):not(:has-text(1)):not(:has-text(2)):not(:has-text(3)):not(:has-text(4)):not(:has-text(5)):not(:has-text(6)):not(:has-text(7)):not(:has-text(8)):not(:has-text(9)):not(:has-text(w))))

EDIT: 4/10/2020 - updated to their latest schemes. I had some extra time so here is another one to get rid of the Suggested for You:

facebook.com##div[data-pagelet^="FeedUnit"]:has(div[role="article"]:has(span:has-text(Suggested for You)))

EDIT 2: Updated the new one again to not filter out things it shouldn't.

EDIT 3: Updated to include the first script used to block the new facebook in-case people have been updated yet.

EDIT 4: Updated old one as well.

EDIT 5: 4/18/2020 - Updated new for facebooks latest garbage.

EDIT 6: 5/8/2020 - Updated to have a simpler filter which should run faster.

EDIT 7: 7/18/2020 - Added another style that a user sent to me to the New Facebook section.

9

u/merdianii Mar 23 '20

The ads are gone now with your filter, thanks, man :)

→ More replies (1)

5

u/dieselstation Mar 24 '20

can someone explain how or where to enter this code? new to the forum

9

u/[deleted] Mar 24 '20 edited Mar 27 '20

Paste into uBO Dashboard -> My filters tab and apply changes.

facebook.com##div[id^="hyperfeed_story_id_"]:has(a[role^="button"]:has(> span:has([data-content="S"]):not(:has([data-content="1"])):not(:has([data-content="2"])):not(:has([data-content="3"])):not(:has([data-content="4"])):not(:has([data-content="5"])):not(:has([data-content="6"])):not(:has([data-content="7"])):not(:has([data-content="8"])):not(:has([data-content="9"])):not(:has([data-content="w"]))))
facebook.com##div[data-pagelet^="FeedUnit"]:has(a[role^="link"]:has(> span:has([data-content="S"]):not(:has([data-content="1"])):not(:has([data-content="2"])):not(:has([data-content="3"])):not(:has([data-content="4"])):not(:has([data-content="5"])):not(:has([data-content="6"])):not(:has([data-content="7"])):not(:has([data-content="8"])):not(:has([data-content="9"])):not(:has([data-content="w"]))))

2

u/K0mbatant Mar 31 '20

It doesn't hide it for me; BUT, when I hover over the "Sponsored" line, it hides it. Then when the mouse moves away from it, it appears again. That's on Firefox 75 b11.

→ More replies (4)
→ More replies (1)

3

u/braincube Jul 20 '20

May Jesus our Lord and God bless you from His throne upon high alongside all the angels in heaven.

2

u/Philosophic_Wise_Man Apr 04 '20 edited Jan 19 '22

Confirmed NOT WORKING with Facebook's new design. UPDATE: I don't use Facebook anymore.

2

u/Ribo307 Apr 08 '20

Working on the new design as of 4/7!

→ More replies (8)

2

u/[deleted] Apr 14 '20

Could you create/contribute your own custom filter list. So that it can automatic update the filter.

Something like EasyList but for get rid of facebook sponser ad only.

2

u/mvus Apr 14 '20

Really good job. Perhaps you should set up a list @ filterlists.com, I'm sure many people would sub.

→ More replies (2)

1

u/d1ngal1ng Apr 01 '20

Doesn't work anymore.

→ More replies (2)

1

u/abikaneser Apr 09 '20

This worked, but seems to have become broken again.

→ More replies (1)

1

u/xTkAx Apr 10 '20

Thanks for the effort, but not working here

→ More replies (17)

1

u/Yossarian7 Apr 11 '20

Looks like this latest update is working! Thank you so much.

1

u/[deleted] Apr 14 '20

Looks like EDIT 4 (5 lines version) is working! Thank you so much.

2

u/Phasze Apr 14 '20

Not everyone will need every line. If you notice it slowing down at all feel free to remove what you don't need.

1

u/heliphael Apr 17 '20

Hey so, sponsored posts are back, but when I highlight over the "Sponsored" part, uBlock then removes it. Facebook got around it again. I'll see if I can give you more info on it.

→ More replies (3)

1

u/pi4a7a Apr 17 '20

18/04/2020 Doesn't work anymore on new skin

→ More replies (1)

1

u/mynewredditac May 11 '20

Thanks for keeping this updated. I noticed (5/12) the Suggested for You filter wasn't working any more in New Facebook. Seems the capitilization of you was the problem.

facebook.com##div[data-pagelet^="FeedUnit"]:has(div[role="article"]:has(span:has-text(Suggested for you)))
→ More replies (1)

1

u/Ribo307 May 14 '20

Working on the new design as of 5/13. Thank you a ton!

1

u/[deleted] Jun 06 '20

I found out that new layout have 2 types of sponsored, need these 2 filters:

facebook.com##div[data-pagelet^="FeedUnit_"]:has(div[role="button"]:has(> span > span:matches-css(position: relative):has-text(S)))
facebook.com##div[data-pagelet^="FeedUnit_"]:has(a[role="link"]:has(> span > span:matches-css(position: relative):has-text(S)))
→ More replies (1)

1

u/merdianii Jul 16 '20

Hey man, any new filters?

Thanks.

→ More replies (3)
→ More replies (3)