Documentation/Source/eric6.WebBrowser.AdBlock.AdBlockMatcher.html

changeset 6028
859f6894eed9
equal deleted inserted replaced
6027:d056a536670e 6028:859f6894eed9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.WebBrowser.AdBlock.AdBlockMatcher</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.WebBrowser.AdBlock.AdBlockMatcher</h1>
23 <p>
24 Module implementing the AdBlock matcher.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#AdBlockMatcher">AdBlockMatcher</a></td>
34 <td>Class implementing the AdBlock matcher.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="AdBlockMatcher" ID="AdBlockMatcher"></a>
43 <h2>AdBlockMatcher</h2>
44 <p>
45 Class implementing the AdBlock matcher.
46 </p>
47 <h3>Derived from</h3>
48 QObject
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Methods</h3>
58 <table>
59 <tr>
60 <td><a href="#AdBlockMatcher.__init__">AdBlockMatcher</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#AdBlockMatcher.adBlockDisabledForUrl">adBlockDisabledForUrl</a></td>
64 <td>Public method to check, if AdBlock is disabled for the given URL.</td>
65 </tr><tr>
66 <td><a href="#AdBlockMatcher.clear">clear</a></td>
67 <td>Public slot to clear the internal structures.</td>
68 </tr><tr>
69 <td><a href="#AdBlockMatcher.elemHideDisabledForUrl">elemHideDisabledForUrl</a></td>
70 <td>Public method to check, if element hiding is disabled for the given URL.</td>
71 </tr><tr>
72 <td><a href="#AdBlockMatcher.elementHidingRules">elementHidingRules</a></td>
73 <td>Public method to get the element hiding rules.</td>
74 </tr><tr>
75 <td><a href="#AdBlockMatcher.elementHidingRulesForDomain">elementHidingRulesForDomain</a></td>
76 <td>Public method to get the element hiding rules for the given domain.</td>
77 </tr><tr>
78 <td><a href="#AdBlockMatcher.match">match</a></td>
79 <td>Public method to match a request.</td>
80 </tr><tr>
81 <td><a href="#AdBlockMatcher.update">update</a></td>
82 <td>Public slot to update the internal state.</td>
83 </tr>
84 </table>
85 <h3>Static Methods</h3>
86 <table>
87 <tr><td>None</td></tr>
88 </table>
89 <a NAME="AdBlockMatcher.__init__" ID="AdBlockMatcher.__init__"></a>
90 <h4>AdBlockMatcher (Constructor)</h4>
91 <b>AdBlockMatcher</b>(<i>manager</i>)
92 <p>
93 Constructor
94 </p><dl>
95 <dt><i>manager</i> (AdBlockManager)</dt>
96 <dd>
97 reference to the AdBlock manager object
98 </dd>
99 </dl><a NAME="AdBlockMatcher.adBlockDisabledForUrl" ID="AdBlockMatcher.adBlockDisabledForUrl"></a>
100 <h4>AdBlockMatcher.adBlockDisabledForUrl</h4>
101 <b>adBlockDisabledForUrl</b>(<i>url</i>)
102 <p>
103 Public method to check, if AdBlock is disabled for the given URL.
104 </p><dl>
105 <dt><i>url</i> (QUrl)</dt>
106 <dd>
107 URL to check
108 </dd>
109 </dl><dl>
110 <dt>Returns:</dt>
111 <dd>
112 flag indicating disabled state
113 </dd>
114 </dl><dl>
115 <dt>Return Type:</dt>
116 <dd>
117 bool
118 </dd>
119 </dl><a NAME="AdBlockMatcher.clear" ID="AdBlockMatcher.clear"></a>
120 <h4>AdBlockMatcher.clear</h4>
121 <b>clear</b>(<i></i>)
122 <p>
123 Public slot to clear the internal structures.
124 </p><a NAME="AdBlockMatcher.elemHideDisabledForUrl" ID="AdBlockMatcher.elemHideDisabledForUrl"></a>
125 <h4>AdBlockMatcher.elemHideDisabledForUrl</h4>
126 <b>elemHideDisabledForUrl</b>(<i>url</i>)
127 <p>
128 Public method to check, if element hiding is disabled for the given
129 URL.
130 </p><dl>
131 <dt><i>url</i> (QUrl)</dt>
132 <dd>
133 URL to check
134 </dd>
135 </dl><dl>
136 <dt>Returns:</dt>
137 <dd>
138 flag indicating disabled state
139 </dd>
140 </dl><dl>
141 <dt>Return Type:</dt>
142 <dd>
143 bool
144 </dd>
145 </dl><a NAME="AdBlockMatcher.elementHidingRules" ID="AdBlockMatcher.elementHidingRules"></a>
146 <h4>AdBlockMatcher.elementHidingRules</h4>
147 <b>elementHidingRules</b>(<i></i>)
148 <p>
149 Public method to get the element hiding rules.
150 </p><dl>
151 <dt>Returns:</dt>
152 <dd>
153 element hiding rules
154 </dd>
155 </dl><dl>
156 <dt>Return Type:</dt>
157 <dd>
158 str
159 </dd>
160 </dl><a NAME="AdBlockMatcher.elementHidingRulesForDomain" ID="AdBlockMatcher.elementHidingRulesForDomain"></a>
161 <h4>AdBlockMatcher.elementHidingRulesForDomain</h4>
162 <b>elementHidingRulesForDomain</b>(<i>domain</i>)
163 <p>
164 Public method to get the element hiding rules for the given domain.
165 </p><dl>
166 <dt><i>domain</i> (str)</dt>
167 <dd>
168 domain name
169 </dd>
170 </dl><dl>
171 <dt>Returns:</dt>
172 <dd>
173 element hiding rules
174 </dd>
175 </dl><dl>
176 <dt>Return Type:</dt>
177 <dd>
178 str
179 </dd>
180 </dl><a NAME="AdBlockMatcher.match" ID="AdBlockMatcher.match"></a>
181 <h4>AdBlockMatcher.match</h4>
182 <b>match</b>(<i>request, urlDomain, urlString</i>)
183 <p>
184 Public method to match a request.
185 </p><dl>
186 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt>
187 <dd>
188 URL request to be matched
189 </dd><dt><i>urlDomain</i> (str)</dt>
190 <dd>
191 domain of the URL
192 </dd><dt><i>urlString</i> (str)</dt>
193 <dd>
194 requested URL as a lowercase string
195 </dd>
196 </dl><dl>
197 <dt>Returns:</dt>
198 <dd>
199 reference to the matched rule
200 </dd>
201 </dl><dl>
202 <dt>Return Type:</dt>
203 <dd>
204 AdBlockRule
205 </dd>
206 </dl><a NAME="AdBlockMatcher.update" ID="AdBlockMatcher.update"></a>
207 <h4>AdBlockMatcher.update</h4>
208 <b>update</b>(<i></i>)
209 <p>
210 Public slot to update the internal state.
211 </p>
212 <div align="right"><a href="#top">Up</a></div>
213 <hr />
214 </body></html>

eric ide

mercurial