News for hackers. Stuff that matters.

Ask HN: Did Facebook just stop fighting adblockers?

One of my hobbies is writing userscripts, specifically adblockers for sites I frequent. Facebook in particular proved a great and worthy adversary on that front, thanks to their attempts to thwart my userscripts. Until very recently, they employed a unique combination of obfuscation techniques to prevent adblockers from programmatically identifying and removing their "Sponsored" posts.

Anyway, until recently I had a working (albeit hacky) adblock heuristic for Facebook that did the job. However, sometime today I noticed that my script stopped working.

Upon further inspection, they seem to have gone back to simply embedding the word "Sponsored" in plaintext, making it trivial for userscripts and adblockers to select and remove these elements.

Is it a fluke, or did Facebook just give up fighting adblock?

( 38 comments | 52 points | on HN )
Re:Ask HN: Did Facebook just stop fighting adblockers? by dmortin on Tuesday August 16, 2022 @02:16AM (#32479718)
There were news in the past about laws which compel web companies to make their sites accessible for screen readers for the blind. Aren't FB's obfuscation techniques against the law, because they prevent screen readers from reading/identifying sponsored posts as such?
Re:Ask HN: Did Facebook just stop fighting adblockers? by alkonaut on Tuesday August 16, 2022 @11:52AM (#32484494)
This seems like the perfect way to address ads. If sites must be accessible and sites must clearly separate ads from non-ads then any attempt to obfuscate this will be futile if a working screen reader is the bar.

Has this been tried anywhere in a court?

Re:Ask HN: Did Facebook just stop fighting adblockers? by bryanrasmussen on Tuesday August 16, 2022 @03:25AM (#32480131)
I think it would be deemed inaccessible in a court of law if there was content you could not read, or you could not navigate between content and submit your own etc. but identifying content as an ad would probably not make it through the courts (especially not if some company like FB had the resources to fight it all the way, at least in the U.S)
Re:Ask HN: Did Facebook just stop fighting adblockers? by duskwuff on Tuesday August 16, 2022 @03:31AM (#32480179)
Ad blockers were identifying Facebook content as ads by looking for the text "sponsored". For a while, Facebook was fighting this by scrambling that text in ways that would definitely have tripped up a screen reader (e.g. inserting extra hidden letters, reordering letters, etc).
Re:Ask HN: Did Facebook just stop fighting adblockers? by bryanrasmussen on Tuesday August 16, 2022 @04:51AM (#32480625)
they could also have put the sponsored message into an aria hidden div then the screen readers would be safe. Not difficult to separate out things that mess up automated solutions and screen readers from each other.
Re:Ask HN: Did Facebook just stop fighting adblockers? by Yiin on Tuesday August 16, 2022 @07:30AM (#32481485)
that would defeat the purpose of the obfuscation, as whatever screen reader can easily read so can userscript.
Re:Ask HN: Did Facebook just stop fighting adblockers? by bryanrasmussen on Wednesday August 17, 2022 @02:34PM (#32500010)
first off I suppose there can be lots of different places where aria-hidden would be used. So it might be really silly for userscript to strip out aria-hidden areas.

So then you use aria-hidden on your area with the obfuscated Sponsored text in it. Userscript still needs to handle it just as much as before, and the screen reader is free from dealing with it.

at any rate there is no real connection between these two technologies and if FB wanted to keep something from screen readers but still force userscripts to have to work to figure out what to do about them there would be thousands of ways to make that the case.

Re:Ask HN: Did Facebook just stop fighting adblockers? by Raed667 on Tuesday August 16, 2022 @03:32AM (#32480194)
So if you're using an accessibility tool, you're not allowed to know which content is sponsored?
Re:Ask HN: Did Facebook just stop fighting adblockers? by bryanrasmussen on Tuesday August 16, 2022 @04:44AM (#32480586)
you would of course have to take it to court to have the court decide that yes, that was part of the definition of accessibility, I do not think that is part of any of the WAI or WCAG definitions although it would a good idea to ask for it, in fact I guess I will raise the issue later today on a mailing list.

But if you took it to court, in the U.S, if it went all the way to Supreme Court I have hard time believing it would not be denied. So effectively, they are not obligated to let you know which is which.

on edit: in initial discussion it was said " 1.1.1 Non-text Content, or 1.3.1 Info and Relationships." https://www.w3.org/WAI/WCAG21/Understanding/info-and-relatio... might be used as an argument that unidentifiable Ad content would be non-accessible https://www.w3.org/WAI/WCAG21/Understanding/info-and-relatio...

Re:Ask HN: Did Facebook just stop fighting adblockers? by endorphine on Tuesday August 16, 2022 @02:32AM (#32479801)
Not a Facebook user, but I wouldn't hold my breath: https://news.ycombinator.com/item?id=32129100
Re:Ask HN: Did Facebook just stop fighting adblockers? by yubiox on Tuesday August 16, 2022 @02:21AM (#32479742)
Now please let us remove "People you may know" and "Suggested for you" crap too.
Re:Ask HN: Did Facebook just stop fighting adblockers? by timbit42 on Tuesday August 16, 2022 @08:46AM (#32482066)
The FBPurity.com browser plugin can do that and a lot more. I've blocked stuff other people Like or Share so I only see what my friends personally post. It makes FB a lot less worse.

Edit: Someone else mentioned the Social Fixer browser plugin which I'd never heard of. On AlternativeTo.net, FBPurity has 33 hearts and Social Fixer has 11. I don't know if that is accurate or not. It may depend on what features you want. Social Fixer is in browser plugin stores. FBPurity used to be but now isn't and must be downloaded directly from their website.

Re:Ask HN: Did Facebook just stop fighting adblockers? by mattkruse on Wednesday August 17, 2022 @03:14PM (#32500468)
Social Fixer (disclaimer: I am the author) has been around a lot longer than FBPurity, and was the original Facebook extension (originally called Better Facebook). The author of FBP was kicked off Facebook because of his questionable practices and breaking of rules. It's used by more people (at the moment) because he maintains it more actively than I can right now, and he shamelessly promotes it. Over the years, features that appear in Social Fixer mysteriously appear shortly after in FB Purity. That's some background.
Re:Ask HN: Did Facebook just stop fighting adblockers? by TedShiller on Tuesday August 16, 2022 @03:08AM (#32480016)
or just don't use FB
Re:Ask HN: Did Facebook just stop fighting adblockers? by TowerTall on Tuesday August 16, 2022 @02:58AM (#32479960)
If you use a desktop browser the extension "social fixer" can do that (no affiliate)
Re:Ask HN: Did Facebook just stop fighting adblockers? by vemv on Tuesday August 16, 2022 @02:27AM (#32479773)
Perhaps they decided that the code complexity is not worth the effort (vs. the % of users that will have an adblocker on)
Re:Ask HN: Did Facebook just stop fighting adblockers? by habibur on Tuesday August 16, 2022 @02:37AM (#32479836)
I installed a popular ad blocker for facebook from chrome store some months back.

Was surprised that it's still working now. Generally those don't work after a few days.

Re:Ask HN: Did Facebook just stop fighting adblockers? by DaSHacka on Tuesday August 16, 2022 @02:47AM (#32479885)
Why not use uBlock Origin? It works on multiple sites, not just Facebook.
Re:Ask HN: Did Facebook just stop fighting adblockers? by taway2022-08-15 on Tuesday August 16, 2022 @02:48AM (#32479897)
uBlock Origin stopped working on Facebook for me years ago
Re:Ask HN: Did Facebook just stop fighting adblockers? by weberer on Tuesday August 16, 2022 @03:26AM (#32480142)
uBlock Origin doesn't work on Facebook. I don't remember it ever working.
Re:Ask HN: Did Facebook just stop fighting adblockers? by Jaruzel on Tuesday August 16, 2022 @03:33AM (#32480201)
Use the 'element picker' mode of uBlock Origin to just remove the parts[1] of Facebook you don't like or want.

---

[1] i.e. ALL of it. :)

Re:Ask HN: Did Facebook just stop fighting adblockers? by leshenka on Tuesday August 16, 2022 @03:57AM (#32480343)
It just going to come up with whatever selector that fits the element under your cursor. On obfuscated sites it's usually some kind of generated mess, randomized classes, randomized element names. Not only they're not constant, they change between reloads of the page.

Not sure how things are on Facebook, my point is that element picker is not a silver bullet.

We need a next generation of adblocker with computer vision that can look at the page and recognize banners visually

Re:Ask HN: Did Facebook just stop fighting adblockers? by habibur on Tuesday August 16, 2022 @04:49AM (#32480611)
Even that didn't work last time I checked, which was years back.

Did it, reload the page, and then watch all the ads still there, but some random div panel getting lost that you need.

Facebook did it intentionally. So that ad blockers don't work.

Re:Ask HN: Did Facebook just stop fighting adblockers? by lapser on Wednesday August 17, 2022 @05:41AM (#32494150)
It sounds like it stopped working when FB declared war on adblockers. It has since become a cat and mouse game. UBlock Origin + relevant lists are likely still your best bet. I can't say for certain how effective they are as I don't use FB but in general the uBlock Origin lists have never taken too long to update, especially with more popular sites.
Re:Ask HN: Did Facebook just stop fighting adblockers? by elcomet on Tuesday August 16, 2022 @03:34AM (#32480210)
It works and has always worked for me on Facebook
Re:Ask HN: Did Facebook just stop fighting adblockers? by themoonisachees on Tuesday August 16, 2022 @02:48AM (#32479890)
Ublock origin generally stays on top of things. Haven't used Facebook in a while though.
Re:Ask HN: Did Facebook just stop fighting adblockers? by Markoff on Tuesday August 16, 2022 @03:43AM (#32480270)
If you are bored feel free to visit Novinky.cz / Seznamzpravy.cz both one of the most visited news websites in Czechia, they are pretty good with breaking website once you start blocking ads.
Re:Ask HN: Did Facebook just stop fighting adblockers? by chucky123 on Tuesday August 16, 2022 @02:14AM (#32479703)
Interesting. Just checked fb and sponsored is inside a single span. Maybe they are ab testing.
Re:Ask HN: Did Facebook just stop fighting adblockers? by sgammon on Tuesday August 16, 2022 @02:30AM (#32479788)
Let's just hope they aren't preparing to launch a cloud
Re:Ask HN: Did Facebook just stop fighting adblockers? by baby on Tuesday August 16, 2022 @03:31AM (#32480168)
FYI it's one of the recurring question asked during the Q&A and I've heard Mark answer once that it's just not the business Meta is in, their business is connecting people. I thought it was an OK answer, still, how much money are they leaving on the table?
Re:Ask HN: Did Facebook just stop fighting adblockers? by speedgoose on Tuesday August 16, 2022 @03:36AM (#32480230)
Isn’t their business about selling ads? I thought they would be more honest.
Re:Ask HN: Did Facebook just stop fighting adblockers? by baby on Tuesday August 16, 2022 @11:55AM (#32484541)
I think it’s important to point out that selling ads is the way to fund the vision for Meta, which is to connect people. I think it is still very true in different parts of Meta (whatsapp for example) which have remained excellent tools for people. Facebook on the other hand has become less and less useful as a tool by diluting its offer with noise and falling in the engagement trap due to FOMO (“we’re going to lose our users and become less relevant as a platform if we don’t optimize on engagement”). That’s my opinion.
Re:Ask HN: Did Facebook just stop fighting adblockers? by sgammon on Tuesday August 16, 2022 @02:30AM (#32479791)
Sorry, I mean a currency
Re:Ask HN: Did Facebook just stop fighting adblockers? by lgeorget on Tuesday August 16, 2022 @02:48AM (#32479895)
If I'm not mistaken they already did, or are doing it. Some time ago I was getting a lot of ads related to this in my spam inbox: https://www.diem.com/en-us/. It used to be called Libra.

Edit: Actually, it looks abandoned, it was supposed to launch last year. They sold all the assets to Silvergate and nothing happened as far as I can tell.

Re:Ask HN: Did Facebook just stop fighting adblockers? by hnbad on Tuesday August 16, 2022 @03:44AM (#32480271)
There was unsurprising massive backlash against Libra at the time and Facebook silently abandoned the project.
Re:Ask HN: Did Facebook just stop fighting adblockers? by sgammon on Wednesday August 17, 2022 @03:49PM (#32500885)
Sorry this was sarcasm
Re:Ask HN: Did Facebook just stop fighting adblockers? by lgeorget on Thursday August 18, 2022 @04:04AM (#32506686)
Oh I see :D
Re:Ask HN: Did Facebook just stop fighting adblockers? by Bayart on Tuesday August 16, 2022 @03:11AM (#32480040)
Weren't you thinking about an alternative universe ? Dare I say, a metaverse ?