diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-01-14 11:38:56 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-01-14 11:38:56 +0100 |
commit | 8d62283b4f44861ebaf21fb78d506b55d1336e3e (patch) | |
tree | f266a3f3a8cbc58ee0a1f0b4ad48faba0e251ec3 /src/adblock/adblockmanager.cpp | |
parent | rekonq 0.3.30 (diff) | |
parent | Cleaning again (the morning after) the adblock thing.. :) (diff) | |
download | rekonq-8d62283b4f44861ebaf21fb78d506b55d1336e3e.tar.xz |
Merge branch 'AdFixes'
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; } |