Blocking whole protocol

Various discussions related to Adblock Plus development

Blocking whole protocol

Postby oroep » Sun Aug 28, 2016 12:49 pm

I'd like to block a whole protocol on my browser (the `market://` protocol).

I tried to add `market://*` to the filters, but it didn't work.

Is there any way to do that?
oroep
 
Posts: 2
Joined: Sun Aug 28, 2016 12:47 pm

Re: Blocking whole protocol

Postby smed79 » Sun Aug 28, 2016 7:53 pm

You mean hide ?
Have you a test page/site?
User avatar
smed79
 
Posts: 1227
Joined: Fri Jan 15, 2010 12:51 am
Location: EasyList Forum

Re: Blocking whole protocol

Postby lewisje » Sun Aug 28, 2016 11:35 pm

ABP only blocks HTTP and HTTPS, and I believe an attempt to navigate to a market: URL doesn't trigger an HTTP request within the browser (instead just launching the Play Store), so ABP is not able to monitor the navigation (a similar reason is why data: URIs cannot be blocked outright).

It is possible to hide links to market: URLs, but you're probably more concerned about sites that automatically redirect you to the Play Store, and hiding rules can't help with that.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
lewisje
 
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Blocking whole protocol

Postby oroep » Mon Aug 29, 2016 12:57 pm

The `market:` URIs open the Google Play Store on Android devices, and an example can be found on the chat of Facebook's mobile website.

Thanks for the explanation @lewisje. I didn't know ABP couldn't block URIs, and yeah, I care about blocking the URI, not just the link.

If I can go off topic: do you know whether there's any way to block these URIs? Anything that can be done on a rooted device? Or can this feature be implemented in the Adblock Plus browser?
oroep
 
Posts: 2
Joined: Sun Aug 28, 2016 12:47 pm

Re: Blocking whole protocol

Postby lewisje » Tue Aug 30, 2016 6:53 am

oroep wrote:I didn't know ABP couldn't block URIs
It can, as long as they're HTTP or HTTPS (or soon, apparently, WS and WSS, for WebSockets).
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
lewisje
 
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Blocking whole protocol

Postby greiner » Mon Sep 05, 2016 2:45 pm

oroep wrote:I'd like to block a whole protocol on my browser (the `market://` protocol).

I tried to add `market://*` to the filters, but it didn't work.

Is there any way to do that?


Links with protocols other than the ones the browser can handle (i.e. http, https, ftp, ftps, etc.) are usually passed on to the operating system so there's no navigation happening in the browser that the extension could cancel as far as I'm aware of. So as lewisje mentioned hiding those links would be one option. Another one would be to write a GreaseMonkey script to intercept clicks on those links - similarly to how we do it with abp:subscribe links (see https://hg.adblockplus.org/adblockplusc ... ostload.js) or even better to rewrite them to working https://play.google.com links.
User avatar
greiner
ABP Developer
 
Posts: 669
Joined: Mon Sep 03, 2012 5:29 pm
Location: Cologne, Germany


Return to Adblock Plus development

Who is online

Users browsing this forum: No registered users and 3 guests