Page 1 of 1

google extension

Posted: Sat Jan 04, 2020 12:15 pm
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!

Re: google extension

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

Re: google extension

Posted: Sun Jan 05, 2020 10:58 am
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

Re: google extension

Posted: Sun Jan 05, 2020 11:03 am
by intense
You should see (examine the code) what other adblockers (uBo / ABP) do (loading /parsing the filters, matching the web requests etc).

Re: google extension

Posted: Sun Jan 05, 2020 11:54 am
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:

Re: google extension

Posted: Sun Jan 05, 2020 12:13 pm
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

Re: google extension

Posted: Sun Jan 05, 2020 12:33 pm
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?

Re: google extension

Posted: Sun Jan 05, 2020 12:42 pm
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)

Re: google extension

Posted: Sun Jan 05, 2020 12:54 pm
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.

Re: google extension

Posted: Sun Jan 05, 2020 1:06 pm
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 ?