Webrequest

Everything about using Adblock Plus on Google Chrome
Locked
Wladimir Palant

Re: Webrequest

Post by Wladimir Palant »

@pirlouy: Actually, the Network tab of the Developer Tools already does the job. The requests showing up as "(failed)" in red are blocked.

Note that in Chrome $object and $object-subrequest are the same thing, there is no way to distinguish them.
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Re: Webrequest

Post by pirlouy »

Ok. So indeed, I need to add

Code: Select all

@@||s.ytimg.com^$object-subrequest
in order to have videos working.

Do you know the bug (feature request) which allows to add object subrequest ? I think I saw it once... Bah, nevermind, I'll search later.

Thanks for your answer.
Wladimir Palant

Re: Webrequest

Post by Wladimir Palant »

@pirlouy: Maybe you don't need to add it. I made sure that the type properties are properly treated as equivalent: https://hg.adblockplus.org/adblockplusc ... ddd5941989 (wanted to do it anyway, current solution was only temporary). New development builds will be out in 5 minutes.

The relevant bug should be http://code.google.com/p/chromium/issue ... l?id=80230
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Re: Webrequest

Post by pirlouy »

I've just installed latest experimental build, and now object-subrequests are not recognized anymore. From what you said, it should do the same as $object. It's not the case.

I just watched the Network tab. Ahah ! Sorry, it's too complicated/boring for a casual user like me. :mrgreen:

I notice something else, but I think it's a webrequest API bug: Even if you block $object, Flash is launched anyway. If it's not a bug, it's a severe restriction.
Wladimir Palant

Re: Webrequest

Post by Wladimir Palant »

Yes, Chrome blocks requests on the network level which is different from Firefox. So Flash is allowed to launch but the download of its data "fails".

Could you give me an example (exact steps to reproduce) of how object subrequests are not recognized?
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Re: Webrequest

Post by pirlouy »

AB+ 1.1.4.695
chrome 16.0.891

Problematic filter:
*$third-party,script,subdocument,object-subrequest

Step:
Go on Youtube and launch a video

Expected:
object blocked, because it comes from ytimg.com and object-subrequest is the same as object

Behavior (bug):
object is not blocked, video is launched

Some clues; these filters works though:
*$third-party,script,object-subrequest
*$third-party,script,subdocument,object
:|
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Webrequest

Post by lewisje »

It has been deferred yet again, to Chrome 17: http://code.google.com/p/chromium/issue ... =60101#c79
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Wladimir Palant

Re: Webrequest

Post by Wladimir Palant »

@lewisje: Yes, that was to be expected actually...

@pirlouy: Works for me. You only see a black rectangle (Flash instantiated but nothing loaded), and network tab of the developer tools shows "watch_*.sfw" in red (request failed). You have the experimental build, right? It should say "Adblock Plus for Google Chrome™ (Beta) experimental build" in the extensions list.
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Re: Webrequest

Post by pirlouy »

Frack, I do not reproduce either. :/
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Re: Webrequest

Post by pirlouy »

Another bug; hope it will be reproductible... :D
If you disable AB+ thanks to the icon, things are still blocked. :/

And a request in the same time: please, offer a context menu (popup or whatever) which allows to unblock everything temporarily.
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Re: Webrequest

Post by pirlouy »

And another one, but it might be a Webrequest API bug...

I try this filter:

Code: Select all

*$third-party,image
and I don't know if it's linked, but I think there's a link.

When I load a website, sometimes, the first display, there's no image, they are all blocked; then I reload the page, and now everything is ok. It's the first load only...
Wladimir Palant

Re: Webrequest

Post by Wladimir Palant »

@pirlouy: First issue is fixed: https://hg.adblockplus.org/adblockplusc ... ee2e6a1bdf

Concerning the second issue: I tried a few sites but couldn't see the issue. That might be because I use Chrome 15 (beta), I guess that you are on Chrome 14? Edit: Then again, did that happen immediately after you installed/activated the extension? Meaning that the tab was already open when the extension became active.
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Re: Webrequest

Post by pirlouy »

I use dev channel, so I was in 16.0.891 until today. I'm now in 16.0.899.
AB+ was already installed and activated, Chrome relaunched. So it's not linked to the first issue.

But as I said, it's not easily reproducible; for example, I did not have this behavior in these last 5 minutes. I'll edit if I reproduce.

Edit: it happened again, but this time only some images were blocked; by the way the placeholder thing is very useful (that was one of my feature request for Firefox :mrgreen: ); combined to the "Click To Play" Chrome feature, it's great.
Wladimir Palant

Re: Webrequest

Post by Wladimir Palant »

Starting with 1.1.4.701 the "no data received" messages and "broken image" placeholders should no longer appear. There is a new option "Hide placeholders of blocked elements" controlling that, it works pretty much the same as "Collapse blocked elements" in Firefox (meaning in particular that $collapse and $~collapse options on individual filters can override the global setting). I plan to rename the option in Firefox as well, the new title does a better job explaining what it does.
Anomalous

Re: Webrequest

Post by Anomalous »

So it doesn't actually collapse, but returns dummy image data for blocked images? That's what I'm seeing anyway.
Locked