Module implementing the AdBlock rule class.
None |
AdBlockRule | Class implementing the AdBlock rule. |
toSecondLevelDomain | Module function to get a second level domain from the given URL. |
Class implementing the AdBlock rule.
None |
None |
AdBlockRule | Constructor |
__convertPatternToRegExp | Private method to convert a wildcard pattern to a regular expression. |
__parseDomains | Private method to parse a string with a domain list. |
__parseFilter | Private method to parse the filter pattern. |
cssSelector | Public method to get the CSS selector of the rule. |
filter | Public method to get the rule filter string. |
isCSSRule | Public method to check, if the rule is a CSS rule. |
isComment | Public method to check, if this is a comment. |
isDocument | Public method to check, if this is a document rule. |
isDomainRestricted | Public method to check, if this rule is restricted by domain. |
isElementHiding | Public method to check, if this is an element hiding rule. |
isEnabled | Public method to check, if the rule is enabled. |
isException | Public method to check, if the rule defines an exception. |
isHeader | Public method to check, if this is a header. |
isInternalDisabled | Public method to check, if this rule was disabled internally. |
isSlow | Public method to check, if this is a slow rule. |
matchDomain | Public method to match a domain. |
matchObject | Public slot to match an object rule. |
matchSubdocument | Public slot to match a sub-document rule. |
matchThirdParty | Public slot to match a third-party rule. |
matchXmlHttpRequest | Public slot to match a XmlHttpRequest rule. |
networkMatch | Public method to check the rule for a match. |
setEnabled | Public method to set the rule's enabled state. |
setException | Public method to set the rule's exception flag. |
setFilter | Public method to set the rule filter string. |
subscription | Public method to get the subscription this rule belongs to. |
urlMatch | Public method to check an URL against the rule. |
None |
Constructor
Private method to convert a wildcard pattern to a regular expression.
Private method to parse a string with a domain list.
Private method to parse the filter pattern.
Public method to get the CSS selector of the rule.
Public method to get the rule filter string.
Public method to check, if the rule is a CSS rule.
Public method to check, if this is a comment.
Public method to check, if this is a document rule.
Public method to check, if this rule is restricted by domain.
Public method to check, if this is an element hiding rule.
Public method to check, if the rule is enabled.
Public method to check, if the rule defines an exception.
Public method to check, if this is a header.
Public method to check, if this rule was disabled internally.
Public method to check, if this is a slow rule.
Public method to match a domain.
Public slot to match an object rule.
Public slot to match a sub-document rule.
Public slot to match a third-party rule.
Public slot to match a XmlHttpRequest rule.
Public method to check the rule for a match.
Public method to set the rule's enabled state.
Public method to set the rule's exception flag.
Public method to set the rule filter string.
Public method to get the subscription this rule belongs to.
Public method to check an URL against the rule.
Module function to get a second level domain from the given URL.