this post was submitted on 17 Nov 2023
256 points (95.4% liked)

Hacker News

4122 readers
2 users here now

This community serves to share top posts on Hacker News with the wider fediverse.

Rules0. Keep it legal

  1. Keep it civil and SFW
  2. Keep it safe for members of marginalised groups

founded 1 year ago
MODERATORS
 

There is a discussion on Hacker News, but feel free to comment here as well.

you are viewing a single comment's thread
view the rest of the comments
[–] FooBarrington@lemmy.world 46 points 11 months ago (1 children)

Manifest v3 is designed to make ad-blocking much harder. First off the filter lists will be distributed as part of the extension itself, which means that updates will be much less frequent (review can take multiple days, even multiple weeks) and certain types of blocking (e.g. YouTube ad blocking) will be completely impossible.

This gives ad networks a big leg up - they can either use techniques like Google does for YouTube ads to circumvent your ad blocker, or rotate domains etc. fast enough that extension updates are too slow.

[–] Sotuanduso@lemm.ee 2 points 11 months ago (2 children)

I see. Poking around a bit more, it looks like the User Scripts API might still be usable to pull in filter lists, as long as users turn on developer mode. What do you think?

[–] Album@lemmy.ca 3 points 11 months ago (1 children)

Effectively the end goal is to make adblocking in chrome hard/complex enough that the masses don't use it. What Google doesn't want is what is effectively a one click solution to adblocking. Anything else is unrealistic and unobtainable and they know it.

So by forcing users to use a version that can't be updated daily/hourly you're already making it so you can't block YouTube ads which as of recent require regular list updates.

Or by forcing users to have two extensions or an extension and an external process to download lists you're adding a step that most users won't bother trying to do.

If Google can cut adblocking to 30% of the current user base then that's a huge win for them.

What I'm trying to say is that it's not entirely correct that Google is trying to "end adblocking" but rather their effort is to reduce it significantly within the products they control.

Honestly I don't blame them but I don't think we can be blamed for switching browsers either.

[–] Sotuanduso@lemm.ee -3 points 11 months ago* (last edited 11 months ago)

If that's the goal, I don't really mind. Adblocking always used to be a thing that most people don't bother with, so companies didn't mind all that much when a few of us did. If we're just going back to that point, and we adblock enthusiasts don't have to jump through ridiculous hoops to keep doing what we're doing, I see that as a win-win.

[–] FooBarrington@lemmy.world 1 points 11 months ago (1 children)

Can UserScripts actually intercept requests? I thought this wasn't possible at all with Manifest v3. If so, nothing useful can be done with the lists.

[–] Sotuanduso@lemm.ee 1 points 11 months ago (1 children)

I meant user scripts might be able to populate filter lists for the main extension to do.

Based on the conversation so far, I'm pretty sure extensions can block ads, but the concern was that filter lists would have to be packaged with the extension instead of dynamically updated. User scripts might be a way around that, as they'd allow loading arbitrary code, but I don't know what the limits on that would be.

[–] FooBarrington@lemmy.world 1 points 11 months ago (1 children)

I meant user scripts might be able to populate filter lists for the main extension to do.

You'd have to show me the API to do so. I'm reasonably sure the uBlock developers would have thought about this, or somebody else.

Based on the conversation so far, I'm pretty sure extensions can block ads

Not really. The extensions can give Chrome a list of things to block, but they can't block themselves, and the lists have to be shipped in the extension.

but the concern was that filter lists would have to be packaged with the extension instead of dynamically updated. User scripts might be a way around that, as they'd allow loading arbitrary code

Arbitrary code only helps you if there is an API to call.

[–] Sotuanduso@lemm.ee 1 points 11 months ago (1 children)

Have the uBlock developers been talking about this? I'd like to read up on that if so.

[–] FooBarrington@lemmy.world 1 points 11 months ago* (last edited 11 months ago) (1 children)

There is this resource: https://support.ublock.org/hc/en-us/articles/11749958544275-Google-s-Manifest-V3-What-it-is-and-what-it-means-for-uBlock-Users-

Here is a summary of a contributor in a Github issue about Manifest v3: https://github.com/uBlockOrigin/uBlock-issues/issues/338#issuecomment-1507539114

uBO Lite:

  • Filter lists update only when the extension updates (no fetching up to date lists from servers)
  • Many filters are dropped at conversion time due to MV3's limited filter syntax
  • No crafting your own filters (thus no element picker)
  • No strict-blocked pages
  • No per-site switches
  • No dynamic filtering -No importing external lists

So it really is a shadow of its former self.

[–] Sotuanduso@lemm.ee 1 points 11 months ago (1 children)

Thanks! So yeah, I guess there will likely be an issue with YouTube ads, if what I've heard about it updating multiple times daily is true, but they don't seem to be expressing concern about it.

Right now I have two Chrome profiles with two different adblockers trying to get around YouTube ads in two different ways, and both of them are able to do so. One is uBlock, doing what uBlock does with an army of developers updating filter lists, and the other seems to be playing the ad in the background while skipping me ahead to the video. So I do think that even if uBlock's current approach fails, they will be able to find a way.

If things go awry and both my adblockers fail, even if it's just on YouTube, I intend to switch to Firefox, but it's not worth the bother yet.

[–] FooBarrington@lemmy.world 1 points 11 months ago (1 children)

That's the thing, it is literally impossible to find a way. Currently, they've implemented content-based blocking - the extension looks at requests made by YouTube, and filters based on them. They still need multiple list updates per day, but this filtering does most of the work.

This is completely impossible with Manifest v3. There is only declarative blocking with v3, which allows for max. 30k rules per extension. The uBlock developers will not invest work to circumvent the restrictions: https://github.com/uBlockOrigin/uBlock-issues/issues/338#issuecomment-1253893421

[–] Sotuanduso@lemm.ee 1 points 11 months ago (1 children)

They will be able to block most ads. For more advanced sites like YouTube, they should be able to use the permissions API to request permissions for those specific sites, allowing them to use the scripting API to inject scripts to those pages, thus gaining better adblocking capabilities.

Also, the comment you linked to was a description of how uBlock Origin Lite works, not the issues faced in manifest v3. I didn't read through the whole thread because it was really long, but I did still manage to find those points in there.

[–] FooBarrington@lemmy.world 1 points 11 months ago (1 children)

They will be able to block most ads. For more advanced sites like YouTube, they should be able to use the permissions API to request permissions for those specific sites, allowing them to use the scripting API to inject scripts to those pages, thus gaining better adblocking capabilities.

Again: what APIs should they use with injected scripts? How do you intercept requests? You can't.

Also, the comment you linked to was a description of how uBlock Origin Lite works, not the issues faced in manifest v3. I didn't read through the whole thread because it was really long, but I did still manage to find those points in there.

The comment I linked is a description from the uBlock developer on how his Manifest v3-compatible version of uBlock works. That is uBlock for Manifest v3, and there won't be another version.

[–] Sotuanduso@lemm.ee 1 points 11 months ago (1 children)

Why do you need to intercept requests to block ads? Why can't you just hide them on the page?

[–] FooBarrington@lemmy.world 1 points 11 months ago

There are multiple big advantages, but it's also kind of necessary to really block ads.

When a request is made to an ad location, you know exactly what it is. Once the ad has been injected into the DOM, you need to find a good heuristic that determines "this is an ad". This is very complex and can be easily circumvented by the developers. If uBlock started doing that with filter lists inside the extension, ad blocking would most likely fully stop working, since ad networks could really, really easily react to updates and slightly change their approach. This would also lead to many, many additional false positives.

And that's not to mention the unnecessary traffic and so on. There are good reasons no current ad blocker works like you describe.