diff options
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; } |