diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-01-14 11:37:45 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-01-14 11:37:45 +0100 |
commit | 1c99aeb13ff4304d45183e81c70c99d33e854d59 (patch) | |
tree | de0809c3cf65726d99a58283765b5de97bdabd02 /src/adblock/adblockmanager.cpp | |
parent | Better AdBlocking things :) (diff) | |
download | rekonq-1c99aeb13ff4304d45183e81c70c99d33e854d59.tar.xz |
Cleaning again (the morning after) the adblock thing.. :)
Removed the "options" part. Will be rewritten in rekonq 0.5
together with the UI..
Diffstat (limited to 'src/adblock/adblockmanager.cpp')
-rw-r--r-- | src/adblock/adblockmanager.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp index 5290d561..c2a42f0b 100644 --- a/src/adblock/adblockmanager.cpp +++ b/src/adblock/adblockmanager.cpp @@ -83,24 +83,23 @@ void AdBlockManager::loadSettings() if (name.startsWith(QLatin1String("Filter"))) { - if(url.startsWith("!")) - { - continue; - } - - if(url.startsWith("@@")) - { - AdBlockRule rule( url.mid(2) ); - _whiteList << rule; - continue; - } - - if(url.startsWith("##")) - { - _hideList << url.mid(2); - } - else - { + if(!url.startsWith("!")) + { + // white rules + if(url.startsWith("@@")) + { + AdBlockRule rule( url.mid(2) ); + _whiteList << rule; + continue; + } + + // hide (CSS) rules + if(url.startsWith("##")) + { + _hideList << url.mid(2); + continue; + } + AdBlockRule rule( url ); _blackList << rule; } |