Opened 8 years ago
Last modified 3 years ago
#13301 new enhancement
Implement an ad-blocker
Reported by: | humdinger | Owned by: | pulkomandy |
---|---|---|---|
Priority: | high | Milestone: | Unscheduled |
Component: | Kits/Web Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
It'd be nice to implement a simple ad-blocker that's using a list of domain names of known ad-servers (e.g. from here) and block those. It can be done manually, see this forum post, but it's not exactly convenient.
As some sites don't load and remain blank in Web+ if such a "hosts" file is deployed, this ad-blocker will have to recognize such a situation and retry to load that site without ad-blocking.
Change History (7)
comment:1 by , 7 years ago
comment:2 by , 6 years ago
OWB happarently has working adblock in C++: https://github.com/deadwood-pl/OdysseyWebBrowser/blob/odyssey/Source/WebCore/loader/AdBlock.cpp
I don't know a strategy for putting it into HaikuWebKit at this time. For one thing, I don't think I'd be allowed to put a file in Source/WebCore/loader/ because it'd affect upstream tree for no purpose? Also WebKit2 might open up a lot more options? So I'm not sure if the code seen in OWB is useful, but just in case, maybe it's useful to someone.
Falkon has something similar, but oh gosh that's a lot of files: https://github.com/KDE/falkon/tree/master/src/lib/adblock
comment:3 by , 6 years ago
Yes, WebKit now has an API for content filtering, but it is only available in WebKit2. It's probably simpler to use that, and maybe we can even get the Safari version of ublock or adblock to run with it.
Having some changes to webcore in our repo is fine, since we will not directly upstream everyting. We will handle upstreaming on a case by case basis. I've not done much because I didn't have time to work both on keeping our port up to date and handling patches reviews frm upstream, but if more people are starting to contribute, we can reconsider that.
comment:4 by , 4 years ago
Milestone: | → Unscheduled |
---|
comment:5 by , 3 years ago
Version: | → R1/Development |
---|
comment:6 by , 3 years ago
Component: | Applications/WebPositive → Kits/Web Kit |
---|
comment:7 by , 3 years ago
Priority: | normal → high |
---|
Qutebrowser, which already works (mostly) on Haiku, implements such an adblocker.
https://github.com/qutebrowser/qutebrowser/blob/master/qutebrowser/browser/adblock.py