summaryrefslogtreecommitdiff
path: root/src/adblock
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix adblock host matcherAndrea Diamantini2010-09-091-6/+6
| | | | Benjamin Poulain's patch. Thanks :)
* This should improve adblock retrieving by NOT asking for SSL confirmationsAndrea Diamantini2010-09-011-0/+6
|
* Add support for domain option in the ad block moduleBenjamin Poulain2010-08-227-12/+54
| | | | | | | | | | | | | | | | | | Some ads were not filtered because they were incorrectly matched by the whitelist. This is because we ignore options, including the domain restrictions. For example, the white filter: @@||pagead2.googlesyndication.com/pagead/show_ads.js$domain=kde.org would match any page regardless of the domain restriction. So no ads from pagead2.googlesyndication.com were filtered. This patch adds support for "domain" options in the fallback rules (the other AdBlockRuleImpl rejects options). The domain of the frame making the request is now compared to the option to take the right decision. This patch requires Qt 4.7 with a recent QtWebKit 2.0.
* Skip the hiding rules specific to domainsBenjamin Poulain2010-08-191-0/+4
| | | | | | | The rules to hide elements for a specific domains were interpreted as regular RegExp rules, which grows the list of filter to test. Those rules are not working with the current implementation, we should just skip them for efficiency.
* Add a special matcher for ad block filters for host nameBenjamin Poulain2010-08-194-1/+132
| | | | | | | | | | Quite a few rules of ad block are just matching domains. Those are of the form: ||trolltech.com^$options This patch add a new class to deal with this kind of filter, AdBlockHostMatcher. Matching a host address is much faster (O(1)) than going through the entire list of rules.
* Improve the performance of AdBlockRuleTextMatchImplBenjamin Poulain2010-08-197-12/+22
| | | | | | | | | | Comparing unicode string without case sensitive is rather expensive because each codepoint must be converted, which is non trivial for unicode. This patch introduce a new argument of ::match() taking the encoded url in lowercase. This way, the conversion can be done only once for a lot of rules.
* Add a primitive text machter as an AdBlockRule implementationsBenjamin Poulain2010-08-183-1/+120
| | | | | | | | About 30% of the filter of easylist are just simple text matching. This new AdBlockRule implementation detects the simple occurences of this to match the url directly. On Qt 4.7, this reduce the time spend in AdBlock by around 20%.
* Split AdBlock rule in two classes to move the implementation out of itBenjamin Poulain2010-08-185-84/+202
| | | | | | | | | | | | In order to make special matching rules, we need specialization of the implementation depending on the type of rule. The previous AdBlockRule was entierly based on regexp. The new one is only a factory to a AdBlockRuleImpl, and delegate everything to this implementation. This will allow faster specialization of the ad block rules in the future.
* Remove the method pattern() from AdBlockRuleBenjamin Poulain2010-08-183-10/+0
| | | | | The method pattern imply the rule is implemented with a regexp, which is what we should try to avoid in the future for performance reasons.
* Cleaning of the constructor of AdBlockRuleBenjamin Poulain2010-08-181-21/+15
| | | | | | | | | | | | | | | | | | | Basic cleaning and bug fixing of AdBlockRule. The options shoud be parsed before checking if the filter is a regexp, otherwhise a regexp with option will never match the rule. For example: -"/.*/$xmlhttprequest" is a valid regexp that would not be matched. -"/.*$xmlhttprequest/" is a valid regexp without options and the option should not have been parsed. The matching of the option should match the last index of "$", not the first, for the same reason as above. Use mid() to split the vector at once instead QString::mid() + QString::lef(). Clean the coding style to follow the conventions of KDE.
* Cleaning some kDebug callsAndrea Diamantini2010-05-221-3/+2
|
* Move adblock rules conf file to appdata, to maintain central config file tinyAndrea Diamantini2010-05-141-4/+4
|
* AdBlock clean up, step 1Andrea Diamantini2010-05-145-40/+10
|
* QLatin1String -> QL1SAndrea Diamantini2010-04-301-7/+7
| | | | added cppcheck script
* Include Fixes, first bunchAndrea Diamantini2010-04-305-8/+10
|
* Krazy fixesAndrea Diamantini2010-04-301-1/+1
|
* cleaning headersAndrea Diamantini2010-04-301-1/+0
|
* New rekonq_defines.hAndrea Diamantini2010-04-304-7/+8
| | | | Speed up compilation & linking on Win, Lin & Mac. Step 1
* A coding style roundAndrea Diamantini2010-04-306-160/+160
|
* Auto Scrolling, first bunch.Andrea Diamantini2010-03-311-15/+0
| | | | key combinations just work :)
* This is just a stupid idea, but it seems working well.. :)Andrea Diamantini2010-03-311-1/+2
| | | | | | The idea basically is: hide and set dimensione to ZERO to adblocked elements. This seems cleaning page WARNING: NEED TESTS!!!
* Not so stupid, after all..Andrea Diamantini2010-03-302-7/+39
|
* Cleaning AdblockManager::loadRules slotAndrea Diamantini2010-03-241-21/+30
|
* abp (Ad Block Plus) fake protocol supportAndrea Diamantini2010-03-192-15/+32
| | | | | | | | | This will let rekonq to automatically add abp subscriptions from the adblockplus.org site (or wherever someone provides abp urls) Anyway, consider that the raccomended way to manage adblock (by me and by abp developers) is just adding the EasyList subscription. rekonq just does it by default!!
* Implemented automatic adblock update.Andrea Diamantini2010-03-134-44/+182
| | | | | | | | | | | | | | This (squashed) commit adds this new feature in rekonq, letting people to simply "forgot" adblock and let rekonq do everything for it I added: - a new (rekonq) adblock widget - an asyncronous method to update rules from the net every TOT days - a better AdBlockManager management. What it is actually missing is the adp protocol support to add new subscriptions to adblock. This will come the next week. For now this part seems stable and needs just testing :)
* tests support for every Qt derived rekonq classAndrea Diamantini2010-02-263-2/+7
|
* Krazy issues (1st branch)Andrea Diamantini2010-02-142-4/+4
|
* Fix copyright for 0.4 beta releaseAndrea Diamantini2010-02-106-6/+6
|
* Save memory!Andrea Diamantini2010-01-213-10/+19
| | | | | | With this commit, we save (at least) 3 bytes for each AdBlockRule defined (and probably more than 3!). In my installation I have about 100 rules... :)
* upgrading RULES files and applying loadUrl fix: "double quotesAndrea Diamantini2010-01-161-2/+2
| | | | | | | | replaced with encoded chars" Courtesy patch of Andrea Scarpino. Thanks and Welcome! CCMAIL:andrea@archlinux.org
* Cleaning again (the morning after) the adblock thing.. :)Andrea Diamantini2010-01-143-79/+101
| | | | | Removed the "options" part. Will be rewritten in rekonq 0.5 together with the UI..
* Better AdBlocking things :)Andrea Diamantini2010-01-146-44/+122
|
* AdBlock Plus rules fast summary :)Andrea Diamantini2010-01-131-1/+78
|
* push startup on disabled adblock (don't load filters)Andrea Diamantini2009-12-021-2/+5
|
* trade-off: speed vs mem saving.Andrea Diamantini2009-12-023-22/+9
| | | | This time I decided for speed..
* We have adblock! (and it works)Andrea Diamantini2009-11-306-362/+289
| | | | | | | | | | | I had a lot of problems implementing it because I started working on assuming 2 things: 1) konqueror implementation works (it's not true, I found a bug! To guess what, try loading current rekonq vs current konqueror against kde-apps.org) 2) Arora's implementation can be easily ported to kcm technology. Another wrong assumption, based on MVP implementation. Sorry for spamming master branch, guys.
* Porting rekonq to last Qt/KDE APIAndrea Diamantini2009-11-306-4/+566
| | | | adblock (KDE one) fix #1
* removed current bugged adblock implementation.Andrea Diamantini2009-11-286-643/+1
| | | | Sorry about that :(
* Moving (back?) to konqueror adblock support.Andrea Diamantini2009-11-259-434/+377
| | | | | This will be useful (if someone is interested) in pushing our patches directly on khtml filter engine.
* Forgot some files :)Andrea Diamantini2009-11-233-1/+258
|
* First adblock implementation. now rekonq seems... slower :(Andrea Diamantini2009-11-232-15/+53
| | | | But at least it's ads free!
* Ok, same other bits on the adblock manager.Andrea Diamantini2009-11-214-23/+34
| | | | Now it's really time to go to bed :)
* A new kcmshell named "webkit adblock" to set... (guess what?!)Andrea Diamantini2009-11-215-26/+189
| | | | First bits work, seems enough for this evening
* AdBlock, first file (and first UI. Probably not last :)Andrea Diamantini2009-11-205-0/+253
|
* AdBlock. First blocks :DAndrea Diamantini2009-11-202-0/+95