integration with AdBlock Plus

Various discussions related to Adblock Plus development
Post Reply
heisters
Posts: 1
Joined: Tue Oct 06, 2015 12:17 am

integration with AdBlock Plus

Post by heisters »

I'm interested in integrating a Chrome extension that monitors ads with AdBlock Plus for Chrome. Basically, I would like to get an event every time AdBlock Plus blocks an ad, that would allow me to get details on the ad that was blocked. Looking in the source for adblockchrome, it looks like there's a FilterNotifier that's used internally that provides some of the functionality I would need. I'm thinking that it might make sense to extend that class to provide additional details on the ad (URL, tag name, etc.), and to use Chrome's cross-extension messaging to publish the events to other plugins that might want it.

First, would this be a good approach to get what I need? Is there another API or approach I should consider?

If it does make sense, I think it would be great if the functionality could be pushed upstream into the main adblockchrome code. Is this the kind of feature that Adblock Plus might accept as a pull request? Otherwise, we could conceivably maintain a fork with the new functionality, and embed our modified adblockplus extension within our own extension. But that seems problematic both from a technical perspective, and from a user-experience perspective. Can you provide any guidance on how to best maintain our modifications? Are there other extensions that have done similar things?

Thanks!
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: integration with AdBlock Plus

Post by mapx »

try contacting the devs on their irc channel
blog/adblock-plus-development-irc-channel-is-now-open
User avatar
greiner
ABP Developer
Posts: 899
Joined: Mon Sep 03, 2012 5:29 pm
Location: Cologne, Germany

Re: integration with AdBlock Plus

Post by greiner »

Sorry for not replying on IRC but note that we're located in Germany so reaching a dev after midnight is unlikely.

Yes, FilterNotifier is what you want to use for that purpose. Furthermore you should check out RequestNotifier which is used on Firefox to provide the "blockable elements" list with the data it needs to show which filters were applied for what.

I'd assume it's unlikely that this would be accepted into the adblockpluschrome code due to the reasons stated below. Feel free to approach snoack on IRC though since he's the one making the call on that.

1. Exposing internal information to third-party extensions might cause issues e.g. in regard to detection and circumvention of Adblock Plus. Note that in Firefox we do provide an interface for other extensions mainly because it doesn't make a difference since Firefox extensions can do so much more than Chrome extensions.

2. There's no functionality inside the extension that makes use of this so depending on the implementation this may cause bloat without providing any added benefit to our users.
Post Reply