summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/adblock/adblockmanager.h19
-rw-r--r--src/adblock/adblockrulenullimpl.cpp8
2 files changed, 22 insertions, 5 deletions
diff --git a/src/adblock/adblockmanager.h b/src/adblock/adblockmanager.h
index ac62c508..1736b2f3 100644
--- a/src/adblock/adblockmanager.h
+++ b/src/adblock/adblockmanager.h
@@ -61,6 +61,10 @@
//
// ### Filter Options
//
+// There are 3 kind of filter options:
+//
+// --- ### TYPE OPTIONS
+//
// You can also specify a number of options to modify the behavior of a filter.
// You list these options separated with commas after a dollar sign ($) at the end of the filter
//
@@ -81,14 +85,27 @@
// $document the page itself (only exception rules can be applied to the page)
// $other types of requests not covered in the list above
//
+//
+// --- ### INVERSE TYPE OPTIONS
+//
// Inverse type options are allowed through the ~ sign, for example:
//
// RULE=*/ads/*~$script,match-case
//
+//
+// --- ### THIRD-PARTY OPTIONS
+//
+// If "third-party" option is specified, filter is applied just to requests coming from a different
+// origin than the currently viewed page.
+// In the same way, the "~third-party" option restricts the filter to the requests coming from the
+// same origin as the currently viewed page.
+//
+//
// ### Regular expressions
//
// They usually allow to check for (a lot of) sites, using just one rule, but be careful:
-// BASIC FILTERS ARE PROCESSED FASTER THAN REGULAR EXPRESSIONS (In ADP! In rekonq, I don't know...)
+// BASIC FILTERS ARE PROCESSED FASTER THAN REGULAR EXPRESSIONS
+// (That's true at least in ABP! In rekonq, I don't know...)
//
//
// ### ELEMENT HIDING (##)
diff --git a/src/adblock/adblockrulenullimpl.cpp b/src/adblock/adblockrulenullimpl.cpp
index 807efc64..2be69789 100644
--- a/src/adblock/adblockrulenullimpl.cpp
+++ b/src/adblock/adblockrulenullimpl.cpp
@@ -58,6 +58,10 @@ bool AdBlockRuleNullImpl::isNullFilter(const QString &filter)
Q_FOREACH(const QString & option, options)
{
+ // third_party: managed inside adblockrulefallbackimpl
+ if (option == QL1S("third-party"))
+ return false;
+
// script
if (option == QL1S("script"))
return true;
@@ -110,10 +114,6 @@ bool AdBlockRuleNullImpl::isNullFilter(const QString &filter)
if (option == QL1S("other"))
return true;
- // third_party: managed inside adblockrulefallbackimpl
- if (option == QL1S("third-party"))
- return false;
-
// collapse
if (option == QL1S("collapse"))
return true;