Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 4340  / 2 Years ago, mon, september 12, 2022, 3:48:41

Gnome-web (new name for epiphany browser) have a ad-blocking feature, which is by default activated.



But sometimes, I get the impression that elements that are not ads are blocked (false positives), that some ads from a particular country are not blocked. Also, after installing gnome-3.12 from ppa gnome-team/staging, ad-blocking completely stopped working.



What is the principle of the filter implemented in gnome-web ? How can I troubleshoot/debug ad-blocking ? Can I configure the blocking patterns ?


More From » gnome

 Answers
7

As of version 3.24, filters.list has been removed, and some time in or around 3.32 it was replaced with a list in gsettings. You can either edit the list graphically using dconf-editor, under /org/gnome/epiphany/adblock-filters, or via the command-line:



$ gsettings get org.gnome.Epiphany adblock-filters
['https://easylist.to/easylist/easylist.txt', 'https://easylist.to/easylist/easyprivacy.txt']
$ gsettings set org.gnome.Epiphany adblock-filters "['https://easylist.to/easylist/easylist.txt', 'https://easylist.to/easylist/easyprivacy.txt', 'https://additional.filter.list/]"


Pre-3.24 instructions:



GNOME Web blocks ads on the basis of the URI of the element. The blocking is done by the UriTester componant (source code). Like Adblock plus, the tester loads a list of patterns from a list, and determine if a URI is an ad if it matches one of the pattern.



The file $HOME_DIR/.config/epiphany/adblock/filters.list contains the locations of the lists to load (one on each line, with a ; at the end of line). If this file doesn't exists (e.g. first time you run epiphany), it defaults to "https://easylist-downloads.adblockplus.org/easylist.txt". Gnome-web then download (and periodically refresh) the pattern lists, and store them in the same directory (with file name like bedc7ed868397c3dcaf6bc40ed9bbf70)



So, in case of troubles, check that you have filters.list, with one line pointing to a valid adblock+ filter, and one file with a file name of 32 hex chars, containing valid blocking pattern. If the file filters.list exists, but is empty, ads won't be filtered at all.



It is also possible to customize the list used by changing the url in filter.list (for instance replacing the default list with a localised list like https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt).


[#25089] Tuesday, September 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
torlim

Total Points: 408
Total Questions: 113
Total Answers: 110

Location: Estonia
Member since Wed, May 27, 2020
4 Years ago
;