Bug 143495 - adblock needs an automatic filterset updater
Summary: adblock needs an automatic filterset updater
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml adblock (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 165129 201715 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-26 19:55 UTC by Andreas Frische
Modified: 2010-12-03 15:26 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Download filter lists from adblockplus.org (3.51 KB, patch)
2009-07-31 17:30 UTC, Thomas Fischer
Details
Updated patch to download filter lists from adblockplus.org (3.85 KB, patch)
2009-07-31 22:26 UTC, Thomas Fischer
Details
Enhances Konqueror's settings GUI to configure automatic filter lists (10.12 KB, patch)
2009-08-01 20:59 UTC, Thomas Fischer
Details
Fixes minor issue with previous patch (10.37 KB, patch)
2009-08-01 21:08 UTC, Thomas Fischer
Details
Example khtmlrc (1.75 KB, text/plain)
2009-08-01 21:11 UTC, Thomas Fischer
Details
Patch for kdebase-4.3.1 (10.50 KB, patch)
2009-09-25 19:10 UTC, Thomas Fischer
Details
Patch for kdelibs-4.3.1 (3.85 KB, patch)
2009-09-25 19:11 UTC, Thomas Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Frische 2007-03-26 19:55:19 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Slackware Packages

Konqueror has had an the adblock functionality for some time now. oviously having that extension alone doesn't help a lot, one needs a filterset.

On Sat Sep 17, 2005 11:46 am ( a long time ago ) "G" offered here:
http://www.filtersetg.com/forum/viewtopic.php?p=654&highlight=konqueror#654
his help in the development of an autoupdater of his filterset. such an extension would be great!

i once heard, that advertising corporations could sue kde, if it was enabled by default, so maybe an integration into kdeaddons/having it not enabled by default would be more feasible?
Comment 1 m.wege 2007-05-10 21:53:49 UTC
There is this service from adblockplus now:
http://adblockplus.org/en/subscriptions

Would be really nice, if this would find its way in Konqui of KDE 4
Comment 2 Thomas Braun 2007-10-14 01:06:24 UTC
I second this request. Right now, I update (too infrequently) this filterset by hand. 
Comment 3 Vincent Panel 2008-01-17 09:49:54 UTC
Implementing something like AdblockPlus would be very interesting. See the source code here : http://adblockplus.org/en/source
Comment 4 Tommi Tervo 2008-06-27 17:36:30 UTC
*** Bug 165129 has been marked as a duplicate of this bug. ***
Comment 5 Arnout Boelens 2008-06-27 17:42:02 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Tommi Tervo 2009-07-28 13:12:28 UTC
*** Bug 201715 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Fischer 2009-07-31 17:28:28 UTC
I created a patch for KDE 4.2.4 which integrates into KHTML's khtml_settings.cpp to fetch and load filter lists from easylist.adblockplus.org.

To load the lists, add the following lines to your khtmlrc in section "Filter Settings" (these lines are just examples, but you will get the idea):
AdblockPlusMaxAgeDays=5
AdblockPlusName-1=EasyList
AdblockPlusLocalFilename-1=adp-easylist.txt
AdblockPlusURL-1=http://easylist.adblockplus.org/easylist.txt
AdblockPlusName-2=EasyPrivacy
AdblockPlusLocalFilename-2=adp-easyprivacy.txt
AdblockPlusURL-2=http://easylist.adblockplus.org/easyprivacy.txt

The patch will take care of downloading these lists (if cached files do not exist or too old) and integrate patterns into KHTML's AdBlock list. The user-defined list will not be touched or modified.
The patch contains no UI code yet and is basically a proof-of-concept. Issues among others is the cache location ("/tmp/").
Feedback is welcome.
Comment 8 Thomas Fischer 2009-07-31 17:30:14 UTC
Created attachment 35759 [details]
Download filter lists from adblockplus.org

This patch applies to KDE 4.2.4's khtml_settings.cpp
No GUI code contained.
Comment 9 David Bailey 2009-07-31 18:00:57 UTC
Thomas, that's great! May I suggest, in the interests of neutrality of use, trademarks, overactive lawyers that you change all references from AdblockPlus to something neutral such as "HTMLFilterList". Let's let the users determine what the HTML filter will be used for.
Comment 10 Thomas Fischer 2009-07-31 22:26:45 UTC
Created attachment 35762 [details]
Updated patch to download filter lists from adblockplus.org

Updated patch: Removed use of "AdblockPlus" term, using "HTMLFilterList" instead; filter lists can be enabled/disabled with "HTMLFilterListEnabled" (maybe necessary for future GUI); skipping more unused lines from filter list; using KGlobal/KStandardDirs to determine cache directory (not clean, though); minor refactoring
Comment 11 Thomas Fischer 2009-08-01 20:59:30 UTC
Created attachment 35776 [details]
Enhances Konqueror's settings GUI to configure automatic filter lists

This patch modifies Konqueror's filteropts.(cpp|h) to add GUI to enable/disable preconfigured filter lists and to change the automatic update interval.
Filter lists must be preconfigure in either the system-wide or personal khtmlrc. Currently, new filter lists can not be added using the GUI, and neither can existing ones be edited; this is a GUI feature only, as the configuration load/save functions would support that.
Feedback is welcome...
Comment 12 Thomas Fischer 2009-08-01 21:08:42 UTC
Created attachment 35777 [details]
Fixes minor issue with previous patch
Comment 13 Thomas Fischer 2009-08-01 21:11:11 UTC
Created attachment 35778 [details]
Example khtmlrc

Example khtmlrc with preconfigured filter lists from http://easylist.adblockplus.org/
Comment 14 Thomas Fischer 2009-09-25 19:10:06 UTC
Created attachment 37175 [details]
Patch for kdebase-4.3.1

Updated patch for KDElibs 4.3.1. No functional changes.
Comment 15 Thomas Fischer 2009-09-25 19:11:48 UTC
Created attachment 37176 [details]
Patch for kdelibs-4.3.1

Updated patch for KDElibs 4.3.1. No functional changes.
Comment 16 Vadim Dyadkin 2009-10-10 17:18:10 UTC
For kde-4.3.2 the same patch
Comment 17 Artem S. Tashkinov 2010-01-30 14:04:18 UTC
Why the hell this patch isn't merged in upstream?
Comment 18 Thomas Fischer 2010-01-30 14:24:44 UTC
(In reply to comment #17)
> Why the hell this patch isn't merged in upstream?

This patch is currently under review:
http://reviewboard.kde.org/r/2265/
Comment 19 Artem S. Tashkinov 2010-01-30 17:31:53 UTC
(In reply to comment #18)
> This patch is currently under review:
> http://reviewboard.kde.org/r/2265/

I perfectly know that it's how I've come across this bug report. I just wonder why it takes so long to be accepted - once being the most advanced browser Konqueror now became a trail horse - it has the least features and the most bugs.

I'd even say that Konqueror in it's current state is unusable - it crashes far too often, it has no features required for productive work, it has bugs which makes it very hard to use.
Comment 20 Paul L. 2010-01-31 02:31:18 UTC
Hell yes! Get this into the next update as quickly as possible - sooner even. This one single improvement to Konqueror will greatly enhance it's value to users.
Comment 21 David Faure 2010-02-27 02:21:00 UTC
SVN commit 1096606 by dfaure:

Finally commit the patch by Thomas Fischer which implements
FEATURE: Automatic AdBlock filter list updates
GUI: the automatic adblock filters must be enabled in "Configure Konqueror / AdBlocK Filters"

Compared to the patch r6, I replaced the manual copy() method with a base class
KHTMLSettingsData which contains all the settings, so that they can be copied in one line.

FEATURE: 143495
Fixed for: 4.5


 M  +173 -4    kdebase/apps/konqueror/settings/konqhtml/filteropts.cpp  
 M  +48 -0     kdebase/apps/konqueror/settings/konqhtml/filteropts.h  
 M  +2 -0      kdelibs/khtml/CMakeLists.txt  
 M  +127 -4    kdelibs/khtml/khtml_settings.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1096606
Comment 22 themroc 2010-12-03 15:26:48 UTC
I have activate the new automatic filterset and add the same filter like in firefox or chromium, but the google advertising on the right side on google.de or google.com are no longer blocked in Konqueror.

I use Kubuntu 10.10 64, KDE 4.5.1.