mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 14:07:45 +00:00
LibWeb: Add a basic content filter (ad blocking!) :^)
This patch adds a global (per-process) filter list to LibWeb that is used to filter all outgoing resource load requests. Basically we check the URL against a list of filter patterns and if it's a match for any one of them, we immediately fail the load. The filter list is a simple text file: ~/.config/BrowserContentFilters.txt It's one filter per line and they are simple glob filters for now, with implicit asterisks (*) at the start and end of the line.
This commit is contained in:
parent
1c8eaf28cd
commit
a6d52e0c97
5 changed files with 141 additions and 1 deletions
|
@ -177,6 +177,7 @@ set(SOURCES
|
|||
Layout/TreeBuilder.cpp
|
||||
Layout/WidgetBox.cpp
|
||||
LayoutTreeModel.cpp
|
||||
Loader/ContentFilter.cpp
|
||||
Loader/FrameLoader.cpp
|
||||
Loader/ImageLoader.cpp
|
||||
Loader/ImageResource.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue