diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-01-14 03:28:15 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-01-14 03:28:15 +0100 |
commit | 1af5fc922877a5ec4db5dfa068b0e88c55fdc1c7 (patch) | |
tree | 4d7b7f022cfdd4ec02bb5789ecf8dd50c7bf899c /src/adblock/adblockrule.cpp | |
parent | AdBlock Plus rules fast summary :) (diff) | |
download | rekonq-1af5fc922877a5ec4db5dfa068b0e88c55fdc1c7.tar.xz |
Better AdBlocking things :)
Diffstat (limited to 'src/adblock/adblockrule.cpp')
-rw-r--r-- | src/adblock/adblockrule.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/adblock/adblockrule.cpp b/src/adblock/adblockrule.cpp index 870ad825..ea3e17de 100644 --- a/src/adblock/adblockrule.cpp +++ b/src/adblock/adblockrule.cpp @@ -60,24 +60,10 @@ AdBlockRule::AdBlockRule(const QString &filter) - : m_cssRule(false) - , m_exceptionRule(false) - , m_enabledRule(true) { bool isRegExpRule = false; - if (filter.startsWith(QLatin1String("!")) || filter.trimmed().isEmpty()) - m_enabledRule = false; - - if (filter.contains(QLatin1String("##"))) - m_cssRule = true; - QString parsedLine = filter; - if (parsedLine.startsWith(QLatin1String("@@"))) - { - m_exceptionRule = true; - parsedLine = parsedLine.mid(2); - } if (parsedLine.startsWith(QLatin1Char('/'))) { @@ -113,12 +99,6 @@ AdBlockRule::AdBlockRule(const QString &filter) // return true means "matched rule", so stop url! bool AdBlockRule::match(const QString &encodedUrl) const { - if (m_cssRule) - return false; - - if (!m_enabledRule) - return false; - bool matched = m_regExp.indexIn(encodedUrl) != -1; if (matched && !m_options.isEmpty()) |