google extension

General information, announcements and questions about the EasyList subscriptions.
Locked
Doddox
New Member
New Member
Posts: 6
Joined: Fri Dec 27, 2019 4:54 pm

google extension

Post by Doddox »

Hey, everybody.

I'm developing a google extension that blocks ads and I'd like to know how to include EasyList in my extension.

Do you have a link that describes what I want?

Thanks in advance!
Moved from Ad Blocking Topics to EasyList Subscriptions on Sat Jan 04, 2020 12:34 pm by intense

User avatar
fanboy
EasyList Author
EasyList Author
Posts: 12231
Joined: Wed Sep 05, 2007 8:17 pm

Post by fanboy »

Its open source, free to use. Supporting all the features/filters in Easylist? Another adblocker, how will it differ with others?
Doddox
New Member
New Member
Posts: 6
Joined: Fri Dec 27, 2019 4:54 pm

Post by Doddox »

fanboy wrote: Sun Jan 05, 2020 9:12 am Its open source, free to use. Supporting all the features/filters in Easylist? Another adblocker, how will it differ with others?
Thank you for your answer.

This isn't just a simple ad-blocker I'm developing. My extension has other features too.

But what I'm really looking for is how to use EasyList to block ads on a website.

How can I make chrome recognize and block ad links?
How do I call EasyList in my extension code to block ads?

Thanks Fanboy
intense
Contributor
Contributor
Posts: 10500
Joined: Wed Mar 27, 2013 9:56 am

Post by intense »

You should see (examine the code) what other adblockers (uBo / ABP) do (loading /parsing the filters, matching the web requests etc).
Doddox
New Member
New Member
Posts: 6
Joined: Fri Dec 27, 2019 4:54 pm

Post by Doddox »

intense wrote: Sun Jan 05, 2020 11:03 am You should see (examine the code) what other adblockers (uBo / ABP) do (loading /parsing the filters, matching the web requests etc).
I've looked at the uBo code but I can't see where they block ads. :oops:
intense
Contributor
Contributor
Posts: 10500
Joined: Wed Mar 27, 2013 9:56 am

Post by intense »

- uBo is compiling /creating an own list of filters from all the enabled lists (just to optimize the rules for its internal engine) => you should first identify where does happen this process
- then you have to see these scripts:

Code: Select all

static-net-filtering.js
cosmetic-filtering.js
static-ext-filtering.js
... and finally all the code
Doddox
New Member
New Member
Posts: 6
Joined: Fri Dec 27, 2019 4:54 pm

Post by Doddox »

intense wrote: Sun Jan 05, 2020 12:13 pm - uBo is compiling /creating an own list of filters from all the enabled lists (just to optimize the rules for its internal engine) => you should first identify where does happen this process
- then you have to see these scripts:

Code: Select all

static-net-filtering.js
cosmetic-filtering.js
static-ext-filtering.js
... and finally all the code

Thank you!

I've seen the code to all three files. But what I'm trying to do is a bit simpler and not as advanced as the uBo one.

I want to implement a simple blocker that will just use a blacklist from my "webRequest" API to block ads on any website.

Do you have any idea how I can do that please?
intense
Contributor
Contributor
Posts: 10500
Joined: Wed Mar 27, 2013 9:56 am

Post by intense »

simple blocker that will just use a blacklist
well, that's exactly what an adblocker is doing.
Maybe you should implement what static-net-filtering.js is doing

(I'm not a js specialist / programmer)
Doddox
New Member
New Member
Posts: 6
Joined: Fri Dec 27, 2019 4:54 pm

Post by Doddox »

intense wrote: Sun Jan 05, 2020 12:42 pm
simple blocker that will just use a blacklist
well, that's exactly what an adblocker is doing.
Maybe you should implement what static-net-filtering.js is doing

(I'm not a js specialist / programmer)
Okay thanks for your help.
Doddox
New Member
New Member
Posts: 6
Joined: Fri Dec 27, 2019 4:54 pm

Post by Doddox »

I want to perform a thing like this: https://adrianstoll.com/dyi-adblocker/

But how can i use EasyList to simply fill my "blocked_domains.js" file and use it ?
Locked