Home ⌂Doc Index ◂Up ▴

eric6.WebBrowser.AdBlock.AdBlockMatcher

Module implementing the AdBlock matcher.

Global Attributes

None

Classes

AdBlockMatcher Class implementing the AdBlock matcher.

Functions

None


AdBlockMatcher

Class implementing the AdBlock matcher.

Derived from

QObject

Class Attributes

None

Class Methods

None

Methods

AdBlockMatcher Constructor
adBlockDisabledForUrl Public method to check, if AdBlock is disabled for the given URL.
clear Public slot to clear the internal structures.
elemHideDisabledForUrl Public method to check, if element hiding is disabled for the given URL.
elementHidingRules Public method to get the element hiding rules.
elementHidingRulesForDomain Public method to get the element hiding rules for the given domain.
match Public method to match a request.
update Public slot to update the internal state.

Static Methods

None

AdBlockMatcher (Constructor)

AdBlockMatcher(manager)

Constructor

manager (AdBlockManager)
reference to the AdBlock manager object

AdBlockMatcher.adBlockDisabledForUrl

adBlockDisabledForUrl(url)

Public method to check, if AdBlock is disabled for the given URL.

url (QUrl)
URL to check
Returns:
flag indicating disabled state
Return Type:
bool

AdBlockMatcher.clear

clear()

Public slot to clear the internal structures.

AdBlockMatcher.elemHideDisabledForUrl

elemHideDisabledForUrl(url)

Public method to check, if element hiding is disabled for the given URL.

url (QUrl)
URL to check
Returns:
flag indicating disabled state
Return Type:
bool

AdBlockMatcher.elementHidingRules

elementHidingRules()

Public method to get the element hiding rules.

Returns:
element hiding rules
Return Type:
str

AdBlockMatcher.elementHidingRulesForDomain

elementHidingRulesForDomain(domain)

Public method to get the element hiding rules for the given domain.

domain (str)
domain name
Returns:
element hiding rules
Return Type:
str

AdBlockMatcher.match

match(request, urlDomain, urlString)

Public method to match a request.

request (QWebEngineUrlRequestInfo)
URL request to be matched
urlDomain (str)
domain of the URL
urlString (str)
requested URL as a lowercase string
Returns:
reference to the matched rule
Return Type:
AdBlockRule

AdBlockMatcher.update

update()

Public slot to update the internal state.

Up



Home ⌂Doc Index ◂Up ▴