64 <td>Constructor</td> |
70 <td>Constructor</td> |
65 </tr><tr> |
71 </tr><tr> |
66 <td><a href="#AdBlockRule.__convertPatternToRegExp">__convertPatternToRegExp</a></td> |
72 <td><a href="#AdBlockRule.__convertPatternToRegExp">__convertPatternToRegExp</a></td> |
67 <td>Private method to convert a wildcard pattern to a regular expression.</td> |
73 <td>Private method to convert a wildcard pattern to a regular expression.</td> |
68 </tr><tr> |
74 </tr><tr> |
|
75 <td><a href="#AdBlockRule.__filterIsOnlyDomain">__filterIsOnlyDomain</a></td> |
|
76 <td>Private method to check, if the given filter is a domain only filter.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#AdBlockRule.__filterIsOnlyEndsMatch">__filterIsOnlyEndsMatch</a></td> |
|
79 <td>Private method to check, if the given filter is to match against the end of a string.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#AdBlockRule.__hasException">__hasException</a></td> |
|
82 <td>Private method to check, if the given option has been set as an exception.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#AdBlockRule.__hasOption">__hasOption</a></td> |
|
85 <td>Private method to check, if the given option has been set.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#AdBlockRule.__isMatchingDomain">__isMatchingDomain</a></td> |
|
88 <td>Private method to check, if a given domain matches the given filter string.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#AdBlockRule.__isMatchingRegExpStrings">__isMatchingRegExpStrings</a></td> |
|
91 <td>Private method to check the given URL against the fixed parts of the regexp.</td> |
|
92 </tr><tr> |
69 <td><a href="#AdBlockRule.__parseDomains">__parseDomains</a></td> |
93 <td><a href="#AdBlockRule.__parseDomains">__parseDomains</a></td> |
70 <td>Private method to parse a string with a domain list.</td> |
94 <td>Private method to parse a string with a domain list.</td> |
71 </tr><tr> |
95 </tr><tr> |
72 <td><a href="#AdBlockRule.__parseFilter">__parseFilter</a></td> |
96 <td><a href="#AdBlockRule.__parseFilter">__parseFilter</a></td> |
73 <td>Private method to parse the filter pattern.</td> |
97 <td>Private method to parse the filter pattern.</td> |
74 </tr><tr> |
98 </tr><tr> |
|
99 <td><a href="#AdBlockRule.__parseRegExpFilter">__parseRegExpFilter</a></td> |
|
100 <td>Private method to split the given regular expression into strings that can be used with 'in'.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#AdBlockRule.__setException">__setException</a></td> |
|
103 <td>Private method to set the given option as an exception.</td> |
|
104 </tr><tr> |
75 <td><a href="#AdBlockRule.__stringMatch">__stringMatch</a></td> |
105 <td><a href="#AdBlockRule.__stringMatch">__stringMatch</a></td> |
76 <td>Private method to match a domain string.</td> |
106 <td>Private method to match a domain string.</td> |
77 </tr><tr> |
107 </tr><tr> |
|
108 <td><a href="#AdBlockRule.addBlockedDomains">addBlockedDomains</a></td> |
|
109 <td>Public method to add to the list of blocked domains.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#AdBlockRule.allowedDomains">allowedDomains</a></td> |
|
112 <td>Public method to get a copy of the list of allowed domains.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#AdBlockRule.blockedDomains">blockedDomains</a></td> |
|
115 <td>Public method to get a copy of the list of blocked domains.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#AdBlockRule.caseSensitivity">caseSensitivity</a></td> |
|
118 <td>Public method to get the case sensitivity.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#AdBlockRule.copyFrom">copyFrom</a></td> |
|
121 <td>Public method to copy another AdBlock rule.</td> |
|
122 </tr><tr> |
78 <td><a href="#AdBlockRule.cssSelector">cssSelector</a></td> |
123 <td><a href="#AdBlockRule.cssSelector">cssSelector</a></td> |
79 <td>Public method to get the CSS selector of the rule.</td> |
124 <td>Public method to get the CSS selector of the rule.</td> |
80 </tr><tr> |
125 </tr><tr> |
81 <td><a href="#AdBlockRule.filter">filter</a></td> |
126 <td><a href="#AdBlockRule.filter">filter</a></td> |
82 <td>Public method to get the rule filter string.</td> |
127 <td>Public method to get the rule filter string.</td> |
83 </tr><tr> |
128 </tr><tr> |
|
129 <td><a href="#AdBlockRule.getRegExpAndMatchers">getRegExpAndMatchers</a></td> |
|
130 <td>Public method to get the regular expression and associated string matchers.</td> |
|
131 </tr><tr> |
84 <td><a href="#AdBlockRule.isCSSRule">isCSSRule</a></td> |
132 <td><a href="#AdBlockRule.isCSSRule">isCSSRule</a></td> |
85 <td>Public method to check, if the rule is a CSS rule.</td> |
133 <td>Public method to check, if the rule is a CSS rule.</td> |
86 </tr><tr> |
134 </tr><tr> |
87 <td><a href="#AdBlockRule.isComment">isComment</a></td> |
135 <td><a href="#AdBlockRule.isComment">isComment</a></td> |
88 <td>Public method to check, if this is a comment.</td> |
136 <td>Public method to check, if this is a comment.</td> |
112 <td>Public method to check, if this is a slow rule.</td> |
160 <td>Public method to check, if this is a slow rule.</td> |
113 </tr><tr> |
161 </tr><tr> |
114 <td><a href="#AdBlockRule.matchDomain">matchDomain</a></td> |
162 <td><a href="#AdBlockRule.matchDomain">matchDomain</a></td> |
115 <td>Public method to match a domain.</td> |
163 <td>Public method to match a domain.</td> |
116 </tr><tr> |
164 </tr><tr> |
|
165 <td><a href="#AdBlockRule.matchFont">matchFont</a></td> |
|
166 <td>Public method to match a Font rule.</td> |
|
167 </tr><tr> |
117 <td><a href="#AdBlockRule.matchImage">matchImage</a></td> |
168 <td><a href="#AdBlockRule.matchImage">matchImage</a></td> |
118 <td>Public slot to match an Image rule.</td> |
169 <td>Public method to match an Image rule.</td> |
|
170 </tr><tr> |
|
171 <td><a href="#AdBlockRule.matchMedia">matchMedia</a></td> |
|
172 <td>Public method to match a Media rule.</td> |
119 </tr><tr> |
173 </tr><tr> |
120 <td><a href="#AdBlockRule.matchObject">matchObject</a></td> |
174 <td><a href="#AdBlockRule.matchObject">matchObject</a></td> |
121 <td>Public slot to match an object rule.</td> |
175 <td>Public method to match an object rule.</td> |
122 </tr><tr> |
176 </tr><tr> |
123 <td><a href="#AdBlockRule.matchObjectSubrequest">matchObjectSubrequest</a></td> |
177 <td><a href="#AdBlockRule.matchObjectSubrequest">matchObjectSubrequest</a></td> |
124 <td>Public slot to match an Object Subrequest rule.</td> |
178 <td>Public method to match an Object Subrequest rule.</td> |
|
179 </tr><tr> |
|
180 <td><a href="#AdBlockRule.matchOther">matchOther</a></td> |
|
181 <td>Public method to match any other rule.</td> |
|
182 </tr><tr> |
|
183 <td><a href="#AdBlockRule.matchPing">matchPing</a></td> |
|
184 <td>Public method to match a Ping rule.</td> |
125 </tr><tr> |
185 </tr><tr> |
126 <td><a href="#AdBlockRule.matchScript">matchScript</a></td> |
186 <td><a href="#AdBlockRule.matchScript">matchScript</a></td> |
127 <td>Public slot to match a Script rule.</td> |
187 <td>Public method to match a Script rule.</td> |
|
188 </tr><tr> |
|
189 <td><a href="#AdBlockRule.matchString">matchString</a></td> |
|
190 <td>Public method to get the match string.</td> |
128 </tr><tr> |
191 </tr><tr> |
129 <td><a href="#AdBlockRule.matchStyleSheet">matchStyleSheet</a></td> |
192 <td><a href="#AdBlockRule.matchStyleSheet">matchStyleSheet</a></td> |
130 <td>Public slot to match a StyleSheet rule.</td> |
193 <td>Public method to match a StyleSheet rule.</td> |
131 </tr><tr> |
194 </tr><tr> |
132 <td><a href="#AdBlockRule.matchSubdocument">matchSubdocument</a></td> |
195 <td><a href="#AdBlockRule.matchSubdocument">matchSubdocument</a></td> |
133 <td>Public slot to match a sub-document rule.</td> |
196 <td>Public method to match a sub-document rule.</td> |
134 </tr><tr> |
197 </tr><tr> |
135 <td><a href="#AdBlockRule.matchThirdParty">matchThirdParty</a></td> |
198 <td><a href="#AdBlockRule.matchThirdParty">matchThirdParty</a></td> |
136 <td>Public slot to match a third-party rule.</td> |
199 <td>Public method to match a third-party rule.</td> |
137 </tr><tr> |
200 </tr><tr> |
138 <td><a href="#AdBlockRule.matchXmlHttpRequest">matchXmlHttpRequest</a></td> |
201 <td><a href="#AdBlockRule.matchXmlHttpRequest">matchXmlHttpRequest</a></td> |
139 <td>Public slot to match a XmlHttpRequest rule.</td> |
202 <td>Public method to match a XmlHttpRequest rule.</td> |
140 </tr><tr> |
203 </tr><tr> |
141 <td><a href="#AdBlockRule.networkMatch">networkMatch</a></td> |
204 <td><a href="#AdBlockRule.networkMatch">networkMatch</a></td> |
142 <td>Public method to check the rule for a match.</td> |
205 <td>Public method to check the rule for a match.</td> |
143 </tr><tr> |
206 </tr><tr> |
|
207 <td><a href="#AdBlockRule.ruleExceptions">ruleExceptions</a></td> |
|
208 <td>Public method to get the rule exceptions.</td> |
|
209 </tr><tr> |
|
210 <td><a href="#AdBlockRule.ruleOptions">ruleOptions</a></td> |
|
211 <td>Public method to get the rule options.</td> |
|
212 </tr><tr> |
|
213 <td><a href="#AdBlockRule.ruleType">ruleType</a></td> |
|
214 <td>Public method to get the rule type.</td> |
|
215 </tr><tr> |
144 <td><a href="#AdBlockRule.setEnabled">setEnabled</a></td> |
216 <td><a href="#AdBlockRule.setEnabled">setEnabled</a></td> |
145 <td>Public method to set the rule's enabled state.</td> |
217 <td>Public method to set the rule's enabled state.</td> |
146 </tr><tr> |
218 </tr><tr> |
147 <td><a href="#AdBlockRule.setException">setException</a></td> |
219 <td><a href="#AdBlockRule.setException">setException</a></td> |
148 <td>Public method to set the rule's exception flag.</td> |
220 <td>Public method to set the rule's exception flag.</td> |
149 </tr><tr> |
221 </tr><tr> |
150 <td><a href="#AdBlockRule.setFilter">setFilter</a></td> |
222 <td><a href="#AdBlockRule.setFilter">setFilter</a></td> |
151 <td>Public method to set the rule filter string.</td> |
223 <td>Public method to set the rule filter string.</td> |
|
224 </tr><tr> |
|
225 <td><a href="#AdBlockRule.setOption">setOption</a></td> |
|
226 <td>Public method to set the given option.</td> |
|
227 </tr><tr> |
|
228 <td><a href="#AdBlockRule.setSubscription">setSubscription</a></td> |
|
229 <td>Public method to set the subscription this rule belongs to.</td> |
152 </tr><tr> |
230 </tr><tr> |
153 <td><a href="#AdBlockRule.subscription">subscription</a></td> |
231 <td><a href="#AdBlockRule.subscription">subscription</a></td> |
154 <td>Public method to get the subscription this rule belongs to.</td> |
232 <td>Public method to get the subscription this rule belongs to.</td> |
155 </tr><tr> |
233 </tr><tr> |
156 <td><a href="#AdBlockRule.urlMatch">urlMatch</a></td> |
234 <td><a href="#AdBlockRule.urlMatch">urlMatch</a></td> |
165 <h4>AdBlockRule (Constructor)</h4> |
243 <h4>AdBlockRule (Constructor)</h4> |
166 <b>AdBlockRule</b>(<i>filterRule="", subscription=None</i>) |
244 <b>AdBlockRule</b>(<i>filterRule="", subscription=None</i>) |
167 <p> |
245 <p> |
168 Constructor |
246 Constructor |
169 </p><dl> |
247 </p><dl> |
170 <dt><i>filterRule</i></dt> |
248 <dt><i>filterRule</i> (str)</dt> |
171 <dd> |
249 <dd> |
172 filter string of the rule (string) |
250 filter string of the rule |
173 </dd><dt><i>subscription</i></dt> |
251 </dd><dt><i>subscription</i> (AdBlockSubscription)</dt> |
174 <dd> |
252 <dd> |
175 reference to the subscription object |
253 reference to the subscription object |
176 (AdBlockSubscription) |
|
177 </dd> |
254 </dd> |
178 </dl><a NAME="AdBlockRule.__convertPatternToRegExp" ID="AdBlockRule.__convertPatternToRegExp"></a> |
255 </dl><a NAME="AdBlockRule.__convertPatternToRegExp" ID="AdBlockRule.__convertPatternToRegExp"></a> |
179 <h4>AdBlockRule.__convertPatternToRegExp</h4> |
256 <h4>AdBlockRule.__convertPatternToRegExp</h4> |
180 <b>__convertPatternToRegExp</b>(<i>wildcardPattern</i>) |
257 <b>__convertPatternToRegExp</b>(<i>wildcardPattern</i>) |
181 <p> |
258 <p> |
182 Private method to convert a wildcard pattern to a regular expression. |
259 Private method to convert a wildcard pattern to a regular expression. |
183 </p><dl> |
260 </p><dl> |
184 <dt><i>wildcardPattern</i></dt> |
261 <dt><i>wildcardPattern</i> (str)</dt> |
185 <dd> |
262 <dd> |
186 string containing the wildcard pattern (string) |
263 string containing the wildcard pattern |
187 </dd> |
264 </dd> |
188 </dl><dl> |
265 </dl><dl> |
189 <dt>Returns:</dt> |
266 <dt>Returns:</dt> |
190 <dd> |
267 <dd> |
191 string containing a regular expression (string) |
268 string containing a regular expression |
|
269 </dd> |
|
270 </dl><dl> |
|
271 <dt>Return Type:</dt> |
|
272 <dd> |
|
273 string |
|
274 </dd> |
|
275 </dl><a NAME="AdBlockRule.__filterIsOnlyDomain" ID="AdBlockRule.__filterIsOnlyDomain"></a> |
|
276 <h4>AdBlockRule.__filterIsOnlyDomain</h4> |
|
277 <b>__filterIsOnlyDomain</b>(<i>filterString</i>) |
|
278 <p> |
|
279 Private method to check, if the given filter is a domain only filter. |
|
280 </p><dl> |
|
281 <dt><i>filterString</i> (str)</dt> |
|
282 <dd> |
|
283 filter string to be checked |
|
284 </dd> |
|
285 </dl><dl> |
|
286 <dt>Returns:</dt> |
|
287 <dd> |
|
288 flag indicating a domain only filter |
|
289 </dd> |
|
290 </dl><dl> |
|
291 <dt>Return Type:</dt> |
|
292 <dd> |
|
293 bool |
|
294 </dd> |
|
295 </dl><a NAME="AdBlockRule.__filterIsOnlyEndsMatch" ID="AdBlockRule.__filterIsOnlyEndsMatch"></a> |
|
296 <h4>AdBlockRule.__filterIsOnlyEndsMatch</h4> |
|
297 <b>__filterIsOnlyEndsMatch</b>(<i>filterString</i>) |
|
298 <p> |
|
299 Private method to check, if the given filter is to match against the |
|
300 end of a string. |
|
301 </p><dl> |
|
302 <dt><i>filterString</i> (str)</dt> |
|
303 <dd> |
|
304 filter string to be checked |
|
305 </dd> |
|
306 </dl><dl> |
|
307 <dt>Returns:</dt> |
|
308 <dd> |
|
309 flag indicating a end of string match filter |
|
310 </dd> |
|
311 </dl><dl> |
|
312 <dt>Return Type:</dt> |
|
313 <dd> |
|
314 bool |
|
315 </dd> |
|
316 </dl><a NAME="AdBlockRule.__hasException" ID="AdBlockRule.__hasException"></a> |
|
317 <h4>AdBlockRule.__hasException</h4> |
|
318 <b>__hasException</b>(<i>opt</i>) |
|
319 <p> |
|
320 Private method to check, if the given option has been set as an |
|
321 exception. |
|
322 </p><dl> |
|
323 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
|
324 <dd> |
|
325 option to check for |
|
326 </dd> |
|
327 </dl><dl> |
|
328 <dt>Returns:</dt> |
|
329 <dd> |
|
330 flag indicating the exception state of the option |
|
331 </dd> |
|
332 </dl><dl> |
|
333 <dt>Return Type:</dt> |
|
334 <dd> |
|
335 bool |
|
336 </dd> |
|
337 </dl><a NAME="AdBlockRule.__hasOption" ID="AdBlockRule.__hasOption"></a> |
|
338 <h4>AdBlockRule.__hasOption</h4> |
|
339 <b>__hasOption</b>(<i>opt</i>) |
|
340 <p> |
|
341 Private method to check, if the given option has been set. |
|
342 </p><dl> |
|
343 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
|
344 <dd> |
|
345 option to check for |
|
346 </dd> |
|
347 </dl><dl> |
|
348 <dt>Returns:</dt> |
|
349 <dd> |
|
350 flag indicating the state of the option |
|
351 </dd> |
|
352 </dl><dl> |
|
353 <dt>Return Type:</dt> |
|
354 <dd> |
|
355 bool |
|
356 </dd> |
|
357 </dl><a NAME="AdBlockRule.__isMatchingDomain" ID="AdBlockRule.__isMatchingDomain"></a> |
|
358 <h4>AdBlockRule.__isMatchingDomain</h4> |
|
359 <b>__isMatchingDomain</b>(<i>domain, filterString</i>) |
|
360 <p> |
|
361 Private method to check, if a given domain matches the given filter |
|
362 string. |
|
363 </p><dl> |
|
364 <dt><i>domain</i> (str)</dt> |
|
365 <dd> |
|
366 domain to be checked |
|
367 </dd><dt><i>filterString</i> (str)</dt> |
|
368 <dd> |
|
369 filter string to check against |
|
370 </dd> |
|
371 </dl><dl> |
|
372 <dt>Returns:</dt> |
|
373 <dd> |
|
374 flag indicating a match |
|
375 </dd> |
|
376 </dl><dl> |
|
377 <dt>Return Type:</dt> |
|
378 <dd> |
|
379 bool |
|
380 </dd> |
|
381 </dl><a NAME="AdBlockRule.__isMatchingRegExpStrings" ID="AdBlockRule.__isMatchingRegExpStrings"></a> |
|
382 <h4>AdBlockRule.__isMatchingRegExpStrings</h4> |
|
383 <b>__isMatchingRegExpStrings</b>(<i>url</i>) |
|
384 <p> |
|
385 Private method to check the given URL against the fixed parts of |
|
386 the regexp. |
|
387 </p><dl> |
|
388 <dt><i>url</i> (str)</dt> |
|
389 <dd> |
|
390 URL to be checked |
|
391 </dd> |
|
392 </dl><dl> |
|
393 <dt>Returns:</dt> |
|
394 <dd> |
|
395 flag indicating a match |
|
396 </dd> |
|
397 </dl><dl> |
|
398 <dt>Return Type:</dt> |
|
399 <dd> |
|
400 bool |
192 </dd> |
401 </dd> |
193 </dl><a NAME="AdBlockRule.__parseDomains" ID="AdBlockRule.__parseDomains"></a> |
402 </dl><a NAME="AdBlockRule.__parseDomains" ID="AdBlockRule.__parseDomains"></a> |
194 <h4>AdBlockRule.__parseDomains</h4> |
403 <h4>AdBlockRule.__parseDomains</h4> |
195 <b>__parseDomains</b>(<i>domains, separator</i>) |
404 <b>__parseDomains</b>(<i>domains, separator</i>) |
196 <p> |
405 <p> |
197 Private method to parse a string with a domain list. |
406 Private method to parse a string with a domain list. |
198 </p><dl> |
407 </p><dl> |
199 <dt><i>domains</i></dt> |
408 <dt><i>domains</i> (str)</dt> |
200 <dd> |
409 <dd> |
201 list of domains (string) |
410 list of domains |
202 </dd><dt><i>separator</i></dt> |
411 </dd><dt><i>separator</i> (str)</dt> |
203 <dd> |
412 <dd> |
204 separator character used by the list (string) |
413 separator character used by the list |
205 </dd> |
414 </dd> |
206 </dl><a NAME="AdBlockRule.__parseFilter" ID="AdBlockRule.__parseFilter"></a> |
415 </dl><a NAME="AdBlockRule.__parseFilter" ID="AdBlockRule.__parseFilter"></a> |
207 <h4>AdBlockRule.__parseFilter</h4> |
416 <h4>AdBlockRule.__parseFilter</h4> |
208 <b>__parseFilter</b>(<i></i>) |
417 <b>__parseFilter</b>(<i></i>) |
209 <p> |
418 <p> |
210 Private method to parse the filter pattern. |
419 Private method to parse the filter pattern. |
211 </p><a NAME="AdBlockRule.__stringMatch" ID="AdBlockRule.__stringMatch"></a> |
420 </p><a NAME="AdBlockRule.__parseRegExpFilter" ID="AdBlockRule.__parseRegExpFilter"></a> |
|
421 <h4>AdBlockRule.__parseRegExpFilter</h4> |
|
422 <b>__parseRegExpFilter</b>(<i>filterString</i>) |
|
423 <p> |
|
424 Private method to split the given regular expression into strings that |
|
425 can be used with 'in'. |
|
426 </p><dl> |
|
427 <dt><i>filterString</i> (str)</dt> |
|
428 <dd> |
|
429 regexp filter string to be parsed |
|
430 </dd> |
|
431 </dl><dl> |
|
432 <dt>Returns:</dt> |
|
433 <dd> |
|
434 fixed string parts of the filter |
|
435 </dd> |
|
436 </dl><dl> |
|
437 <dt>Return Type:</dt> |
|
438 <dd> |
|
439 list of str |
|
440 </dd> |
|
441 </dl><a NAME="AdBlockRule.__setException" ID="AdBlockRule.__setException"></a> |
|
442 <h4>AdBlockRule.__setException</h4> |
|
443 <b>__setException</b>(<i>opt, on</i>) |
|
444 <p> |
|
445 Private method to set the given option as an exception. |
|
446 </p><dl> |
|
447 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
|
448 <dd> |
|
449 option to be set |
|
450 </dd><dt><i>on</i> (bool)</dt> |
|
451 <dd> |
|
452 flag indicating to set or unset the exception |
|
453 </dd> |
|
454 </dl><a NAME="AdBlockRule.__stringMatch" ID="AdBlockRule.__stringMatch"></a> |
212 <h4>AdBlockRule.__stringMatch</h4> |
455 <h4>AdBlockRule.__stringMatch</h4> |
213 <b>__stringMatch</b>(<i>domain, encodedUrl</i>) |
456 <b>__stringMatch</b>(<i>domain, encodedUrl</i>) |
214 <p> |
457 <p> |
215 Private method to match a domain string. |
458 Private method to match a domain string. |
216 </p><dl> |
459 </p><dl> |
228 </dd> |
471 </dd> |
229 </dl><dl> |
472 </dl><dl> |
230 <dt>Return Type:</dt> |
473 <dt>Return Type:</dt> |
231 <dd> |
474 <dd> |
232 bool |
475 bool |
|
476 </dd> |
|
477 </dl><a NAME="AdBlockRule.addBlockedDomains" ID="AdBlockRule.addBlockedDomains"></a> |
|
478 <h4>AdBlockRule.addBlockedDomains</h4> |
|
479 <b>addBlockedDomains</b>(<i>domains</i>) |
|
480 <p> |
|
481 Public method to add to the list of blocked domains. |
|
482 </p><dl> |
|
483 <dt><i>domains</i> (str or list of str)</dt> |
|
484 <dd> |
|
485 list of domains to be added |
|
486 </dd> |
|
487 </dl><a NAME="AdBlockRule.allowedDomains" ID="AdBlockRule.allowedDomains"></a> |
|
488 <h4>AdBlockRule.allowedDomains</h4> |
|
489 <b>allowedDomains</b>(<i></i>) |
|
490 <p> |
|
491 Public method to get a copy of the list of allowed domains. |
|
492 </p><dl> |
|
493 <dt>Returns:</dt> |
|
494 <dd> |
|
495 list of allowed domains |
|
496 </dd> |
|
497 </dl><dl> |
|
498 <dt>Return Type:</dt> |
|
499 <dd> |
|
500 list of str |
|
501 </dd> |
|
502 </dl><a NAME="AdBlockRule.blockedDomains" ID="AdBlockRule.blockedDomains"></a> |
|
503 <h4>AdBlockRule.blockedDomains</h4> |
|
504 <b>blockedDomains</b>(<i></i>) |
|
505 <p> |
|
506 Public method to get a copy of the list of blocked domains. |
|
507 </p><dl> |
|
508 <dt>Returns:</dt> |
|
509 <dd> |
|
510 list of blocked domains |
|
511 </dd> |
|
512 </dl><dl> |
|
513 <dt>Return Type:</dt> |
|
514 <dd> |
|
515 list of str |
|
516 </dd> |
|
517 </dl><a NAME="AdBlockRule.caseSensitivity" ID="AdBlockRule.caseSensitivity"></a> |
|
518 <h4>AdBlockRule.caseSensitivity</h4> |
|
519 <b>caseSensitivity</b>(<i></i>) |
|
520 <p> |
|
521 Public method to get the case sensitivity. |
|
522 </p><dl> |
|
523 <dt>Returns:</dt> |
|
524 <dd> |
|
525 case sensitivity |
|
526 </dd> |
|
527 </dl><dl> |
|
528 <dt>Return Type:</dt> |
|
529 <dd> |
|
530 Qt.CaseSensitivity |
|
531 </dd> |
|
532 </dl><a NAME="AdBlockRule.copyFrom" ID="AdBlockRule.copyFrom"></a> |
|
533 <h4>AdBlockRule.copyFrom</h4> |
|
534 <b>copyFrom</b>(<i>other</i>) |
|
535 <p> |
|
536 Public method to copy another AdBlock rule. |
|
537 </p><dl> |
|
538 <dt><i>other</i> (AdBlockRule)</dt> |
|
539 <dd> |
|
540 reference to the AdBlock rule to copy from |
233 </dd> |
541 </dd> |
234 </dl><a NAME="AdBlockRule.cssSelector" ID="AdBlockRule.cssSelector"></a> |
542 </dl><a NAME="AdBlockRule.cssSelector" ID="AdBlockRule.cssSelector"></a> |
235 <h4>AdBlockRule.cssSelector</h4> |
543 <h4>AdBlockRule.cssSelector</h4> |
236 <b>cssSelector</b>(<i></i>) |
544 <b>cssSelector</b>(<i></i>) |
237 <p> |
545 <p> |
238 Public method to get the CSS selector of the rule. |
546 Public method to get the CSS selector of the rule. |
239 </p><dl> |
547 </p><dl> |
240 <dt>Returns:</dt> |
548 <dt>Returns:</dt> |
241 <dd> |
549 <dd> |
242 CSS selector (string) |
550 CSS selector |
|
551 </dd> |
|
552 </dl><dl> |
|
553 <dt>Return Type:</dt> |
|
554 <dd> |
|
555 str |
243 </dd> |
556 </dd> |
244 </dl><a NAME="AdBlockRule.filter" ID="AdBlockRule.filter"></a> |
557 </dl><a NAME="AdBlockRule.filter" ID="AdBlockRule.filter"></a> |
245 <h4>AdBlockRule.filter</h4> |
558 <h4>AdBlockRule.filter</h4> |
246 <b>filter</b>(<i></i>) |
559 <b>filter</b>(<i></i>) |
247 <p> |
560 <p> |
248 Public method to get the rule filter string. |
561 Public method to get the rule filter string. |
249 </p><dl> |
562 </p><dl> |
250 <dt>Returns:</dt> |
563 <dt>Returns:</dt> |
251 <dd> |
564 <dd> |
252 rule filter string (string) |
565 rule filter string |
|
566 </dd> |
|
567 </dl><dl> |
|
568 <dt>Return Type:</dt> |
|
569 <dd> |
|
570 str |
|
571 </dd> |
|
572 </dl><a NAME="AdBlockRule.getRegExpAndMatchers" ID="AdBlockRule.getRegExpAndMatchers"></a> |
|
573 <h4>AdBlockRule.getRegExpAndMatchers</h4> |
|
574 <b>getRegExpAndMatchers</b>(<i></i>) |
|
575 <p> |
|
576 Public method to get the regular expression and associated string |
|
577 matchers. |
|
578 </p><dl> |
|
579 <dt>Returns:</dt> |
|
580 <dd> |
|
581 tuple containing the regular expression and the list of |
|
582 string matchers |
|
583 </dd> |
|
584 </dl><dl> |
|
585 <dt>Return Type:</dt> |
|
586 <dd> |
|
587 tuple of (QRegExp, list of str) |
253 </dd> |
588 </dd> |
254 </dl><a NAME="AdBlockRule.isCSSRule" ID="AdBlockRule.isCSSRule"></a> |
589 </dl><a NAME="AdBlockRule.isCSSRule" ID="AdBlockRule.isCSSRule"></a> |
255 <h4>AdBlockRule.isCSSRule</h4> |
590 <h4>AdBlockRule.isCSSRule</h4> |
256 <b>isCSSRule</b>(<i></i>) |
591 <b>isCSSRule</b>(<i></i>) |
257 <p> |
592 <p> |
258 Public method to check, if the rule is a CSS rule. |
593 Public method to check, if the rule is a CSS rule. |
259 </p><dl> |
594 </p><dl> |
260 <dt>Returns:</dt> |
595 <dt>Returns:</dt> |
261 <dd> |
596 <dd> |
262 flag indicating a CSS rule (boolean) |
597 flag indicating a CSS rule |
|
598 </dd> |
|
599 </dl><dl> |
|
600 <dt>Return Type:</dt> |
|
601 <dd> |
|
602 bool |
263 </dd> |
603 </dd> |
264 </dl><a NAME="AdBlockRule.isComment" ID="AdBlockRule.isComment"></a> |
604 </dl><a NAME="AdBlockRule.isComment" ID="AdBlockRule.isComment"></a> |
265 <h4>AdBlockRule.isComment</h4> |
605 <h4>AdBlockRule.isComment</h4> |
266 <b>isComment</b>(<i></i>) |
606 <b>isComment</b>(<i></i>) |
267 <p> |
607 <p> |
268 Public method to check, if this is a comment. |
608 Public method to check, if this is a comment. |
269 </p><dl> |
609 </p><dl> |
270 <dt>Returns:</dt> |
610 <dt>Returns:</dt> |
271 <dd> |
611 <dd> |
272 flag indicating a comment (boolean) |
612 flag indicating a comment |
|
613 </dd> |
|
614 </dl><dl> |
|
615 <dt>Return Type:</dt> |
|
616 <dd> |
|
617 bool |
273 </dd> |
618 </dd> |
274 </dl><a NAME="AdBlockRule.isDocument" ID="AdBlockRule.isDocument"></a> |
619 </dl><a NAME="AdBlockRule.isDocument" ID="AdBlockRule.isDocument"></a> |
275 <h4>AdBlockRule.isDocument</h4> |
620 <h4>AdBlockRule.isDocument</h4> |
276 <b>isDocument</b>(<i></i>) |
621 <b>isDocument</b>(<i></i>) |
277 <p> |
622 <p> |
278 Public method to check, if this is a document rule. |
623 Public method to check, if this is a document rule. |
279 </p><dl> |
624 </p><dl> |
280 <dt>Returns:</dt> |
625 <dt>Returns:</dt> |
281 <dd> |
626 <dd> |
282 flag indicating a document rule (boolean) |
627 flag indicating a document rule |
|
628 </dd> |
|
629 </dl><dl> |
|
630 <dt>Return Type:</dt> |
|
631 <dd> |
|
632 bool |
283 </dd> |
633 </dd> |
284 </dl><a NAME="AdBlockRule.isDomainRestricted" ID="AdBlockRule.isDomainRestricted"></a> |
634 </dl><a NAME="AdBlockRule.isDomainRestricted" ID="AdBlockRule.isDomainRestricted"></a> |
285 <h4>AdBlockRule.isDomainRestricted</h4> |
635 <h4>AdBlockRule.isDomainRestricted</h4> |
286 <b>isDomainRestricted</b>(<i></i>) |
636 <b>isDomainRestricted</b>(<i></i>) |
287 <p> |
637 <p> |
288 Public method to check, if this rule is restricted by domain. |
638 Public method to check, if this rule is restricted by domain. |
289 </p><dl> |
639 </p><dl> |
290 <dt>Returns:</dt> |
640 <dt>Returns:</dt> |
291 <dd> |
641 <dd> |
292 flag indicating a domain restriction (boolean) |
642 flag indicating a domain restriction |
|
643 </dd> |
|
644 </dl><dl> |
|
645 <dt>Return Type:</dt> |
|
646 <dd> |
|
647 bool |
293 </dd> |
648 </dd> |
294 </dl><a NAME="AdBlockRule.isElementHiding" ID="AdBlockRule.isElementHiding"></a> |
649 </dl><a NAME="AdBlockRule.isElementHiding" ID="AdBlockRule.isElementHiding"></a> |
295 <h4>AdBlockRule.isElementHiding</h4> |
650 <h4>AdBlockRule.isElementHiding</h4> |
296 <b>isElementHiding</b>(<i></i>) |
651 <b>isElementHiding</b>(<i></i>) |
297 <p> |
652 <p> |
298 Public method to check, if this is an element hiding rule. |
653 Public method to check, if this is an element hiding rule. |
299 </p><dl> |
654 </p><dl> |
300 <dt>Returns:</dt> |
655 <dt>Returns:</dt> |
301 <dd> |
656 <dd> |
302 flag indicating an element hiding rule (boolean) |
657 flag indicating an element hiding rule |
|
658 </dd> |
|
659 </dl><dl> |
|
660 <dt>Return Type:</dt> |
|
661 <dd> |
|
662 bool |
303 </dd> |
663 </dd> |
304 </dl><a NAME="AdBlockRule.isEnabled" ID="AdBlockRule.isEnabled"></a> |
664 </dl><a NAME="AdBlockRule.isEnabled" ID="AdBlockRule.isEnabled"></a> |
305 <h4>AdBlockRule.isEnabled</h4> |
665 <h4>AdBlockRule.isEnabled</h4> |
306 <b>isEnabled</b>(<i></i>) |
666 <b>isEnabled</b>(<i></i>) |
307 <p> |
667 <p> |
308 Public method to check, if the rule is enabled. |
668 Public method to check, if the rule is enabled. |
309 </p><dl> |
669 </p><dl> |
310 <dt>Returns:</dt> |
670 <dt>Returns:</dt> |
311 <dd> |
671 <dd> |
312 flag indicating enabled state (boolean) |
672 flag indicating enabled state |
|
673 </dd> |
|
674 </dl><dl> |
|
675 <dt>Return Type:</dt> |
|
676 <dd> |
|
677 bool |
313 </dd> |
678 </dd> |
314 </dl><a NAME="AdBlockRule.isException" ID="AdBlockRule.isException"></a> |
679 </dl><a NAME="AdBlockRule.isException" ID="AdBlockRule.isException"></a> |
315 <h4>AdBlockRule.isException</h4> |
680 <h4>AdBlockRule.isException</h4> |
316 <b>isException</b>(<i></i>) |
681 <b>isException</b>(<i></i>) |
317 <p> |
682 <p> |
318 Public method to check, if the rule defines an exception. |
683 Public method to check, if the rule defines an exception. |
319 </p><dl> |
684 </p><dl> |
320 <dt>Returns:</dt> |
685 <dt>Returns:</dt> |
321 <dd> |
686 <dd> |
322 flag indicating an exception (boolean) |
687 flag indicating an exception |
|
688 </dd> |
|
689 </dl><dl> |
|
690 <dt>Return Type:</dt> |
|
691 <dd> |
|
692 bool |
323 </dd> |
693 </dd> |
324 </dl><a NAME="AdBlockRule.isHeader" ID="AdBlockRule.isHeader"></a> |
694 </dl><a NAME="AdBlockRule.isHeader" ID="AdBlockRule.isHeader"></a> |
325 <h4>AdBlockRule.isHeader</h4> |
695 <h4>AdBlockRule.isHeader</h4> |
326 <b>isHeader</b>(<i></i>) |
696 <b>isHeader</b>(<i></i>) |
327 <p> |
697 <p> |
328 Public method to check, if this is a header. |
698 Public method to check, if this is a header. |
329 </p><dl> |
699 </p><dl> |
330 <dt>Returns:</dt> |
700 <dt>Returns:</dt> |
331 <dd> |
701 <dd> |
332 flag indicating a header (boolean) |
702 flag indicating a header |
|
703 </dd> |
|
704 </dl><dl> |
|
705 <dt>Return Type:</dt> |
|
706 <dd> |
|
707 bool |
333 </dd> |
708 </dd> |
334 </dl><a NAME="AdBlockRule.isInternalDisabled" ID="AdBlockRule.isInternalDisabled"></a> |
709 </dl><a NAME="AdBlockRule.isInternalDisabled" ID="AdBlockRule.isInternalDisabled"></a> |
335 <h4>AdBlockRule.isInternalDisabled</h4> |
710 <h4>AdBlockRule.isInternalDisabled</h4> |
336 <b>isInternalDisabled</b>(<i></i>) |
711 <b>isInternalDisabled</b>(<i></i>) |
337 <p> |
712 <p> |
338 Public method to check, if this rule was disabled internally. |
713 Public method to check, if this rule was disabled internally. |
339 </p><dl> |
714 </p><dl> |
340 <dt>Returns:</dt> |
715 <dt>Returns:</dt> |
341 <dd> |
716 <dd> |
342 flag indicating an internally disabled rule (boolean) |
717 flag indicating an internally disabled rule |
|
718 </dd> |
|
719 </dl><dl> |
|
720 <dt>Return Type:</dt> |
|
721 <dd> |
|
722 bool |
343 </dd> |
723 </dd> |
344 </dl><a NAME="AdBlockRule.isSlow" ID="AdBlockRule.isSlow"></a> |
724 </dl><a NAME="AdBlockRule.isSlow" ID="AdBlockRule.isSlow"></a> |
345 <h4>AdBlockRule.isSlow</h4> |
725 <h4>AdBlockRule.isSlow</h4> |
346 <b>isSlow</b>(<i></i>) |
726 <b>isSlow</b>(<i></i>) |
347 <p> |
727 <p> |
348 Public method to check, if this is a slow rule. |
728 Public method to check, if this is a slow rule. |
349 </p><dl> |
729 </p><dl> |
350 <dt>Returns:</dt> |
730 <dt>Returns:</dt> |
351 <dd> |
731 <dd> |
352 flag indicating a slow rule (boolean) |
732 flag indicating a slow rule |
|
733 </dd> |
|
734 </dl><dl> |
|
735 <dt>Return Type:</dt> |
|
736 <dd> |
|
737 bool |
353 </dd> |
738 </dd> |
354 </dl><a NAME="AdBlockRule.matchDomain" ID="AdBlockRule.matchDomain"></a> |
739 </dl><a NAME="AdBlockRule.matchDomain" ID="AdBlockRule.matchDomain"></a> |
355 <h4>AdBlockRule.matchDomain</h4> |
740 <h4>AdBlockRule.matchDomain</h4> |
356 <b>matchDomain</b>(<i>domain</i>) |
741 <b>matchDomain</b>(<i>domain</i>) |
357 <p> |
742 <p> |
358 Public method to match a domain. |
743 Public method to match a domain. |
359 </p><dl> |
744 </p><dl> |
360 <dt><i>domain</i></dt> |
745 <dt><i>domain</i> (str)</dt> |
361 <dd> |
746 <dd> |
362 domain name to check (string) |
747 domain name to check |
363 </dd> |
748 </dd> |
364 </dl><dl> |
749 </dl><dl> |
365 <dt>Returns:</dt> |
750 <dt>Returns:</dt> |
366 <dd> |
751 <dd> |
367 flag indicating a match (boolean) |
752 flag indicating a match |
|
753 </dd> |
|
754 </dl><dl> |
|
755 <dt>Return Type:</dt> |
|
756 <dd> |
|
757 bool |
|
758 </dd> |
|
759 </dl><a NAME="AdBlockRule.matchFont" ID="AdBlockRule.matchFont"></a> |
|
760 <h4>AdBlockRule.matchFont</h4> |
|
761 <b>matchFont</b>(<i>req</i>) |
|
762 <p> |
|
763 Public method to match a Font rule. |
|
764 </p><dl> |
|
765 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
|
766 <dd> |
|
767 request object to check |
|
768 </dd> |
|
769 </dl><dl> |
|
770 <dt>Returns:</dt> |
|
771 <dd> |
|
772 flag indicating a match |
|
773 </dd> |
|
774 </dl><dl> |
|
775 <dt>Return Type:</dt> |
|
776 <dd> |
|
777 bool |
368 </dd> |
778 </dd> |
369 </dl><a NAME="AdBlockRule.matchImage" ID="AdBlockRule.matchImage"></a> |
779 </dl><a NAME="AdBlockRule.matchImage" ID="AdBlockRule.matchImage"></a> |
370 <h4>AdBlockRule.matchImage</h4> |
780 <h4>AdBlockRule.matchImage</h4> |
371 <b>matchImage</b>(<i>req</i>) |
781 <b>matchImage</b>(<i>req</i>) |
372 <p> |
782 <p> |
373 Public slot to match an Image rule. |
783 Public method to match an Image rule. |
374 </p><dl> |
784 </p><dl> |
375 <dt><i>req</i></dt> |
785 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
376 <dd> |
786 <dd> |
377 request object to check (QWebEngineUrlRequestInfo) |
787 request object to check |
378 </dd> |
788 </dd> |
379 </dl><dl> |
789 </dl><dl> |
380 <dt>Returns:</dt> |
790 <dt>Returns:</dt> |
381 <dd> |
791 <dd> |
382 flag indicating a match (boolean) |
792 flag indicating a match |
|
793 </dd> |
|
794 </dl><dl> |
|
795 <dt>Return Type:</dt> |
|
796 <dd> |
|
797 bool |
|
798 </dd> |
|
799 </dl><a NAME="AdBlockRule.matchMedia" ID="AdBlockRule.matchMedia"></a> |
|
800 <h4>AdBlockRule.matchMedia</h4> |
|
801 <b>matchMedia</b>(<i>req</i>) |
|
802 <p> |
|
803 Public method to match a Media rule. |
|
804 </p><dl> |
|
805 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
|
806 <dd> |
|
807 request object to check |
|
808 </dd> |
|
809 </dl><dl> |
|
810 <dt>Returns:</dt> |
|
811 <dd> |
|
812 flag indicating a match |
|
813 </dd> |
|
814 </dl><dl> |
|
815 <dt>Return Type:</dt> |
|
816 <dd> |
|
817 bool |
383 </dd> |
818 </dd> |
384 </dl><a NAME="AdBlockRule.matchObject" ID="AdBlockRule.matchObject"></a> |
819 </dl><a NAME="AdBlockRule.matchObject" ID="AdBlockRule.matchObject"></a> |
385 <h4>AdBlockRule.matchObject</h4> |
820 <h4>AdBlockRule.matchObject</h4> |
386 <b>matchObject</b>(<i>req</i>) |
821 <b>matchObject</b>(<i>req</i>) |
387 <p> |
822 <p> |
388 Public slot to match an object rule. |
823 Public method to match an object rule. |
389 </p><dl> |
824 </p><dl> |
390 <dt><i>req</i></dt> |
825 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
391 <dd> |
826 <dd> |
392 request object to check (QWebEngineUrlRequestInfo) |
827 request object to check |
393 </dd> |
828 </dd> |
394 </dl><dl> |
829 </dl><dl> |
395 <dt>Returns:</dt> |
830 <dt>Returns:</dt> |
396 <dd> |
831 <dd> |
397 flag indicating a match (boolean) |
832 flag indicating a match |
|
833 </dd> |
|
834 </dl><dl> |
|
835 <dt>Return Type:</dt> |
|
836 <dd> |
|
837 bool |
398 </dd> |
838 </dd> |
399 </dl><a NAME="AdBlockRule.matchObjectSubrequest" ID="AdBlockRule.matchObjectSubrequest"></a> |
839 </dl><a NAME="AdBlockRule.matchObjectSubrequest" ID="AdBlockRule.matchObjectSubrequest"></a> |
400 <h4>AdBlockRule.matchObjectSubrequest</h4> |
840 <h4>AdBlockRule.matchObjectSubrequest</h4> |
401 <b>matchObjectSubrequest</b>(<i>req</i>) |
841 <b>matchObjectSubrequest</b>(<i>req</i>) |
402 <p> |
842 <p> |
403 Public slot to match an Object Subrequest rule. |
843 Public method to match an Object Subrequest rule. |
404 </p><dl> |
844 </p><dl> |
405 <dt><i>req</i></dt> |
845 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
406 <dd> |
846 <dd> |
407 request object to check (QWebEngineUrlRequestInfo) |
847 request object to check |
408 </dd> |
848 </dd> |
409 </dl><dl> |
849 </dl><dl> |
410 <dt>Returns:</dt> |
850 <dt>Returns:</dt> |
411 <dd> |
851 <dd> |
412 flag indicating a match (boolean) |
852 flag indicating a match |
|
853 </dd> |
|
854 </dl><dl> |
|
855 <dt>Return Type:</dt> |
|
856 <dd> |
|
857 boolean |
|
858 </dd> |
|
859 </dl><a NAME="AdBlockRule.matchOther" ID="AdBlockRule.matchOther"></a> |
|
860 <h4>AdBlockRule.matchOther</h4> |
|
861 <b>matchOther</b>(<i>req</i>) |
|
862 <p> |
|
863 Public method to match any other rule. |
|
864 </p><dl> |
|
865 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
|
866 <dd> |
|
867 request object to check |
|
868 </dd> |
|
869 </dl><dl> |
|
870 <dt>Returns:</dt> |
|
871 <dd> |
|
872 flag indicating a match |
|
873 </dd> |
|
874 </dl><dl> |
|
875 <dt>Return Type:</dt> |
|
876 <dd> |
|
877 bool |
|
878 </dd> |
|
879 </dl><a NAME="AdBlockRule.matchPing" ID="AdBlockRule.matchPing"></a> |
|
880 <h4>AdBlockRule.matchPing</h4> |
|
881 <b>matchPing</b>(<i>req</i>) |
|
882 <p> |
|
883 Public method to match a Ping rule. |
|
884 </p><dl> |
|
885 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
|
886 <dd> |
|
887 request object to check |
|
888 </dd> |
|
889 </dl><dl> |
|
890 <dt>Returns:</dt> |
|
891 <dd> |
|
892 flag indicating a match |
|
893 </dd> |
|
894 </dl><dl> |
|
895 <dt>Return Type:</dt> |
|
896 <dd> |
|
897 bool |
413 </dd> |
898 </dd> |
414 </dl><a NAME="AdBlockRule.matchScript" ID="AdBlockRule.matchScript"></a> |
899 </dl><a NAME="AdBlockRule.matchScript" ID="AdBlockRule.matchScript"></a> |
415 <h4>AdBlockRule.matchScript</h4> |
900 <h4>AdBlockRule.matchScript</h4> |
416 <b>matchScript</b>(<i>req</i>) |
901 <b>matchScript</b>(<i>req</i>) |
417 <p> |
902 <p> |
418 Public slot to match a Script rule. |
903 Public method to match a Script rule. |
419 </p><dl> |
904 </p><dl> |
420 <dt><i>req</i></dt> |
905 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
421 <dd> |
906 <dd> |
422 request object to check (QWebEngineUrlRequestInfo) |
907 request object to check |
423 </dd> |
908 </dd> |
424 </dl><dl> |
909 </dl><dl> |
425 <dt>Returns:</dt> |
910 <dt>Returns:</dt> |
426 <dd> |
911 <dd> |
427 flag indicating a match (boolean) |
912 flag indicating a match |
|
913 </dd> |
|
914 </dl><dl> |
|
915 <dt>Return Type:</dt> |
|
916 <dd> |
|
917 bool |
|
918 </dd> |
|
919 </dl><a NAME="AdBlockRule.matchString" ID="AdBlockRule.matchString"></a> |
|
920 <h4>AdBlockRule.matchString</h4> |
|
921 <b>matchString</b>(<i></i>) |
|
922 <p> |
|
923 Public method to get the match string. |
|
924 </p><dl> |
|
925 <dt>Returns:</dt> |
|
926 <dd> |
|
927 match string |
|
928 </dd> |
|
929 </dl><dl> |
|
930 <dt>Return Type:</dt> |
|
931 <dd> |
|
932 str |
428 </dd> |
933 </dd> |
429 </dl><a NAME="AdBlockRule.matchStyleSheet" ID="AdBlockRule.matchStyleSheet"></a> |
934 </dl><a NAME="AdBlockRule.matchStyleSheet" ID="AdBlockRule.matchStyleSheet"></a> |
430 <h4>AdBlockRule.matchStyleSheet</h4> |
935 <h4>AdBlockRule.matchStyleSheet</h4> |
431 <b>matchStyleSheet</b>(<i>req</i>) |
936 <b>matchStyleSheet</b>(<i>req</i>) |
432 <p> |
937 <p> |
433 Public slot to match a StyleSheet rule. |
938 Public method to match a StyleSheet rule. |
434 </p><dl> |
939 </p><dl> |
435 <dt><i>req</i></dt> |
940 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
436 <dd> |
941 <dd> |
437 request object to check (QWebEngineUrlRequestInfo) |
942 request object to check |
438 </dd> |
943 </dd> |
439 </dl><dl> |
944 </dl><dl> |
440 <dt>Returns:</dt> |
945 <dt>Returns:</dt> |
441 <dd> |
946 <dd> |
442 flag indicating a match (boolean) |
947 flag indicating a match |
|
948 </dd> |
|
949 </dl><dl> |
|
950 <dt>Return Type:</dt> |
|
951 <dd> |
|
952 bool |
443 </dd> |
953 </dd> |
444 </dl><a NAME="AdBlockRule.matchSubdocument" ID="AdBlockRule.matchSubdocument"></a> |
954 </dl><a NAME="AdBlockRule.matchSubdocument" ID="AdBlockRule.matchSubdocument"></a> |
445 <h4>AdBlockRule.matchSubdocument</h4> |
955 <h4>AdBlockRule.matchSubdocument</h4> |
446 <b>matchSubdocument</b>(<i>req</i>) |
956 <b>matchSubdocument</b>(<i>req</i>) |
447 <p> |
957 <p> |
448 Public slot to match a sub-document rule. |
958 Public method to match a sub-document rule. |
449 </p><dl> |
959 </p><dl> |
450 <dt><i>req</i></dt> |
960 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
451 <dd> |
961 <dd> |
452 request object to check (QWebEngineUrlRequestInfo) |
962 request object to check |
453 </dd> |
963 </dd> |
454 </dl><dl> |
964 </dl><dl> |
455 <dt>Returns:</dt> |
965 <dt>Returns:</dt> |
456 <dd> |
966 <dd> |
457 flag indicating a match (boolean) |
967 flag indicating a match |
|
968 </dd> |
|
969 </dl><dl> |
|
970 <dt>Return Type:</dt> |
|
971 <dd> |
|
972 boolean |
458 </dd> |
973 </dd> |
459 </dl><a NAME="AdBlockRule.matchThirdParty" ID="AdBlockRule.matchThirdParty"></a> |
974 </dl><a NAME="AdBlockRule.matchThirdParty" ID="AdBlockRule.matchThirdParty"></a> |
460 <h4>AdBlockRule.matchThirdParty</h4> |
975 <h4>AdBlockRule.matchThirdParty</h4> |
461 <b>matchThirdParty</b>(<i>req</i>) |
976 <b>matchThirdParty</b>(<i>req</i>) |
462 <p> |
977 <p> |
463 Public slot to match a third-party rule. |
978 Public method to match a third-party rule. |
464 </p><dl> |
979 </p><dl> |
465 <dt><i>req</i></dt> |
980 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
466 <dd> |
981 <dd> |
467 request object to check (QWebEngineUrlRequestInfo) |
982 request object to check |
468 </dd> |
983 </dd> |
469 </dl><dl> |
984 </dl><dl> |
470 <dt>Returns:</dt> |
985 <dt>Returns:</dt> |
471 <dd> |
986 <dd> |
472 flag indicating a match (boolean) |
987 flag indicating a match |
|
988 </dd> |
|
989 </dl><dl> |
|
990 <dt>Return Type:</dt> |
|
991 <dd> |
|
992 boolean |
473 </dd> |
993 </dd> |
474 </dl><a NAME="AdBlockRule.matchXmlHttpRequest" ID="AdBlockRule.matchXmlHttpRequest"></a> |
994 </dl><a NAME="AdBlockRule.matchXmlHttpRequest" ID="AdBlockRule.matchXmlHttpRequest"></a> |
475 <h4>AdBlockRule.matchXmlHttpRequest</h4> |
995 <h4>AdBlockRule.matchXmlHttpRequest</h4> |
476 <b>matchXmlHttpRequest</b>(<i>req</i>) |
996 <b>matchXmlHttpRequest</b>(<i>req</i>) |
477 <p> |
997 <p> |
478 Public slot to match a XmlHttpRequest rule. |
998 Public method to match a XmlHttpRequest rule. |
479 </p><dl> |
999 </p><dl> |
480 <dt><i>req</i></dt> |
1000 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
481 <dd> |
1001 <dd> |
482 request object to check (QWebEngineUrlRequestInfo) |
1002 request object to check |
483 </dd> |
1003 </dd> |
484 </dl><dl> |
1004 </dl><dl> |
485 <dt>Returns:</dt> |
1005 <dt>Returns:</dt> |
486 <dd> |
1006 <dd> |
487 flag indicating a match (boolean) |
1007 flag indicating a match |
|
1008 </dd> |
|
1009 </dl><dl> |
|
1010 <dt>Return Type:</dt> |
|
1011 <dd> |
|
1012 bool |
488 </dd> |
1013 </dd> |
489 </dl><a NAME="AdBlockRule.networkMatch" ID="AdBlockRule.networkMatch"></a> |
1014 </dl><a NAME="AdBlockRule.networkMatch" ID="AdBlockRule.networkMatch"></a> |
490 <h4>AdBlockRule.networkMatch</h4> |
1015 <h4>AdBlockRule.networkMatch</h4> |
491 <b>networkMatch</b>(<i>request, domain, encodedUrl</i>) |
1016 <b>networkMatch</b>(<i>request, domain, encodedUrl</i>) |
492 <p> |
1017 <p> |
510 </dl><dl> |
1035 </dl><dl> |
511 <dt>Return Type:</dt> |
1036 <dt>Return Type:</dt> |
512 <dd> |
1037 <dd> |
513 bool |
1038 bool |
514 </dd> |
1039 </dd> |
|
1040 </dl><a NAME="AdBlockRule.ruleExceptions" ID="AdBlockRule.ruleExceptions"></a> |
|
1041 <h4>AdBlockRule.ruleExceptions</h4> |
|
1042 <b>ruleExceptions</b>(<i></i>) |
|
1043 <p> |
|
1044 Public method to get the rule exceptions. |
|
1045 </p><dl> |
|
1046 <dt>Returns:</dt> |
|
1047 <dd> |
|
1048 rule exceptions |
|
1049 </dd> |
|
1050 </dl><dl> |
|
1051 <dt>Return Type:</dt> |
|
1052 <dd> |
|
1053 AdBlockRuleOption |
|
1054 </dd> |
|
1055 </dl><a NAME="AdBlockRule.ruleOptions" ID="AdBlockRule.ruleOptions"></a> |
|
1056 <h4>AdBlockRule.ruleOptions</h4> |
|
1057 <b>ruleOptions</b>(<i></i>) |
|
1058 <p> |
|
1059 Public method to get the rule options. |
|
1060 </p><dl> |
|
1061 <dt>Returns:</dt> |
|
1062 <dd> |
|
1063 rule options |
|
1064 </dd> |
|
1065 </dl><dl> |
|
1066 <dt>Return Type:</dt> |
|
1067 <dd> |
|
1068 AdBlockRuleOption |
|
1069 </dd> |
|
1070 </dl><a NAME="AdBlockRule.ruleType" ID="AdBlockRule.ruleType"></a> |
|
1071 <h4>AdBlockRule.ruleType</h4> |
|
1072 <b>ruleType</b>(<i></i>) |
|
1073 <p> |
|
1074 Public method to get the rule type. |
|
1075 </p><dl> |
|
1076 <dt>Returns:</dt> |
|
1077 <dd> |
|
1078 rule type |
|
1079 </dd> |
|
1080 </dl><dl> |
|
1081 <dt>Return Type:</dt> |
|
1082 <dd> |
|
1083 AdBlockRuleType |
|
1084 </dd> |
515 </dl><a NAME="AdBlockRule.setEnabled" ID="AdBlockRule.setEnabled"></a> |
1085 </dl><a NAME="AdBlockRule.setEnabled" ID="AdBlockRule.setEnabled"></a> |
516 <h4>AdBlockRule.setEnabled</h4> |
1086 <h4>AdBlockRule.setEnabled</h4> |
517 <b>setEnabled</b>(<i>enabled</i>) |
1087 <b>setEnabled</b>(<i>enabled</i>) |
518 <p> |
1088 <p> |
519 Public method to set the rule's enabled state. |
1089 Public method to set the rule's enabled state. |
520 </p><dl> |
1090 </p><dl> |
521 <dt><i>enabled</i></dt> |
1091 <dt><i>enabled</i> (bool)</dt> |
522 <dd> |
1092 <dd> |
523 flag indicating the new enabled state (boolean) |
1093 flag indicating the new enabled state |
524 </dd> |
1094 </dd> |
525 </dl><a NAME="AdBlockRule.setException" ID="AdBlockRule.setException"></a> |
1095 </dl><a NAME="AdBlockRule.setException" ID="AdBlockRule.setException"></a> |
526 <h4>AdBlockRule.setException</h4> |
1096 <h4>AdBlockRule.setException</h4> |
527 <b>setException</b>(<i>exception</i>) |
1097 <b>setException</b>(<i>exception</i>) |
528 <p> |
1098 <p> |
529 Public method to set the rule's exception flag. |
1099 Public method to set the rule's exception flag. |
530 </p><dl> |
1100 </p><dl> |
531 <dt><i>exception</i></dt> |
1101 <dt><i>exception</i> (bool)</dt> |
532 <dd> |
1102 <dd> |
533 flag indicating an exception rule (boolean) |
1103 flag indicating an exception rule |
534 </dd> |
1104 </dd> |
535 </dl><a NAME="AdBlockRule.setFilter" ID="AdBlockRule.setFilter"></a> |
1105 </dl><a NAME="AdBlockRule.setFilter" ID="AdBlockRule.setFilter"></a> |
536 <h4>AdBlockRule.setFilter</h4> |
1106 <h4>AdBlockRule.setFilter</h4> |
537 <b>setFilter</b>(<i>filterRule</i>) |
1107 <b>setFilter</b>(<i>filterRule</i>) |
538 <p> |
1108 <p> |
539 Public method to set the rule filter string. |
1109 Public method to set the rule filter string. |
540 </p><dl> |
1110 </p><dl> |
541 <dt><i>filterRule</i></dt> |
1111 <dt><i>filterRule</i> (str)</dt> |
542 <dd> |
1112 <dd> |
543 rule filter string (string) |
1113 rule filter string |
|
1114 </dd> |
|
1115 </dl><a NAME="AdBlockRule.setOption" ID="AdBlockRule.setOption"></a> |
|
1116 <h4>AdBlockRule.setOption</h4> |
|
1117 <b>setOption</b>(<i>opt</i>) |
|
1118 <p> |
|
1119 Public method to set the given option. |
|
1120 </p><dl> |
|
1121 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
|
1122 <dd> |
|
1123 option to be set |
|
1124 </dd> |
|
1125 </dl><a NAME="AdBlockRule.setSubscription" ID="AdBlockRule.setSubscription"></a> |
|
1126 <h4>AdBlockRule.setSubscription</h4> |
|
1127 <b>setSubscription</b>(<i>subscription</i>) |
|
1128 <p> |
|
1129 Public method to set the subscription this rule belongs to. |
|
1130 </p><dl> |
|
1131 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
|
1132 <dd> |
|
1133 subscription of the rule |
544 </dd> |
1134 </dd> |
545 </dl><a NAME="AdBlockRule.subscription" ID="AdBlockRule.subscription"></a> |
1135 </dl><a NAME="AdBlockRule.subscription" ID="AdBlockRule.subscription"></a> |
546 <h4>AdBlockRule.subscription</h4> |
1136 <h4>AdBlockRule.subscription</h4> |
547 <b>subscription</b>(<i></i>) |
1137 <b>subscription</b>(<i></i>) |
548 <p> |
1138 <p> |
549 Public method to get the subscription this rule belongs to. |
1139 Public method to get the subscription this rule belongs to. |
550 </p><dl> |
1140 </p><dl> |
551 <dt>Returns:</dt> |
1141 <dt>Returns:</dt> |
552 <dd> |
1142 <dd> |
553 subscription of the rule (AdBlockSubscription) |
1143 subscription of the rule |
|
1144 </dd> |
|
1145 </dl><dl> |
|
1146 <dt>Return Type:</dt> |
|
1147 <dd> |
|
1148 AdBlockSubscription |
554 </dd> |
1149 </dd> |
555 </dl><a NAME="AdBlockRule.urlMatch" ID="AdBlockRule.urlMatch"></a> |
1150 </dl><a NAME="AdBlockRule.urlMatch" ID="AdBlockRule.urlMatch"></a> |
556 <h4>AdBlockRule.urlMatch</h4> |
1151 <h4>AdBlockRule.urlMatch</h4> |
557 <b>urlMatch</b>(<i>url</i>) |
1152 <b>urlMatch</b>(<i>url</i>) |
558 <p> |
1153 <p> |
559 Public method to check an URL against the rule. |
1154 Public method to check an URL against the rule. |
560 </p><dl> |
1155 </p><dl> |
561 <dt><i>url</i></dt> |
1156 <dt><i>url</i> (QUrl)</dt> |
562 <dd> |
1157 <dd> |
563 URL to check (QUrl) |
1158 URL to check |
564 </dd> |
1159 </dd> |
565 </dl><dl> |
1160 </dl><dl> |
566 <dt>Returns:</dt> |
1161 <dt>Returns:</dt> |
567 <dd> |
1162 <dd> |
568 flag indicating a match (boolean) |
1163 flag indicating a match |
|
1164 </dd> |
|
1165 </dl><dl> |
|
1166 <dt>Return Type:</dt> |
|
1167 <dd> |
|
1168 bool |
569 </dd> |
1169 </dd> |
570 </dl> |
1170 </dl> |
|
1171 <div align="right"><a href="#top">Up</a></div> |
|
1172 <hr /><hr /> |
|
1173 <a NAME="AdBlockRuleOption" ID="AdBlockRuleOption"></a> |
|
1174 <h2>AdBlockRuleOption</h2> |
|
1175 <p> |
|
1176 Class implementing the rule option enum. |
|
1177 </p> |
|
1178 <h3>Derived from</h3> |
|
1179 IntFlag |
|
1180 <h3>Class Attributes</h3> |
|
1181 <table> |
|
1182 <tr><td>DocumentOption</td></tr><tr><td>DomainRestrictedOption</td></tr><tr><td>ElementHideOption</td></tr><tr><td>FontOption</td></tr><tr><td>ImageOption</td></tr><tr><td>MediaOption</td></tr><tr><td>NoOption</td></tr><tr><td>ObjectOption</td></tr><tr><td>ObjectSubrequestOption</td></tr><tr><td>OtherOption</td></tr><tr><td>PingOption</td></tr><tr><td>ScriptOption</td></tr><tr><td>StyleSheetOption</td></tr><tr><td>SubdocumentOption</td></tr><tr><td>ThirdPartyOption</td></tr><tr><td>XMLHttpRequestOption</td></tr> |
|
1183 </table> |
|
1184 <h3>Class Methods</h3> |
|
1185 <table> |
|
1186 <tr><td>None</td></tr> |
|
1187 </table> |
|
1188 <h3>Methods</h3> |
|
1189 <table> |
|
1190 <tr><td>None</td></tr> |
|
1191 </table> |
|
1192 <h3>Static Methods</h3> |
|
1193 <table> |
|
1194 <tr><td>None</td></tr> |
|
1195 </table> |
|
1196 |
|
1197 <div align="right"><a href="#top">Up</a></div> |
|
1198 <hr /><hr /> |
|
1199 <a NAME="AdBlockRuleType" ID="AdBlockRuleType"></a> |
|
1200 <h2>AdBlockRuleType</h2> |
|
1201 <p> |
|
1202 Class implementing the rule type enum. |
|
1203 </p> |
|
1204 <h3>Derived from</h3> |
|
1205 IntFlag |
|
1206 <h3>Class Attributes</h3> |
|
1207 <table> |
|
1208 <tr><td>CssRule</td></tr><tr><td>DomainMatchRule</td></tr><tr><td>Invalid</td></tr><tr><td>MatchAllUrlsRule</td></tr><tr><td>RegExpMatchRule</td></tr><tr><td>StringContainsMatchRule</td></tr><tr><td>StringEndsMatchRule</td></tr> |
|
1209 </table> |
|
1210 <h3>Class Methods</h3> |
|
1211 <table> |
|
1212 <tr><td>None</td></tr> |
|
1213 </table> |
|
1214 <h3>Methods</h3> |
|
1215 <table> |
|
1216 <tr><td>None</td></tr> |
|
1217 </table> |
|
1218 <h3>Static Methods</h3> |
|
1219 <table> |
|
1220 <tr><td>None</td></tr> |
|
1221 </table> |
|
1222 |
571 <div align="right"><a href="#top">Up</a></div> |
1223 <div align="right"><a href="#top">Up</a></div> |
572 <hr /><hr /> |
1224 <hr /><hr /> |
573 <a NAME="toSecondLevelDomain" ID="toSecondLevelDomain"></a> |
1225 <a NAME="toSecondLevelDomain" ID="toSecondLevelDomain"></a> |
574 <h2>toSecondLevelDomain</h2> |
1226 <h2>toSecondLevelDomain</h2> |
575 <b>toSecondLevelDomain</b>(<i>url</i>) |
1227 <b>toSecondLevelDomain</b>(<i>url</i>) |
576 <p> |
1228 <p> |
577 Module function to get a second level domain from the given URL. |
1229 Module function to get a second level domain from the given URL. |
578 </p><dl> |
1230 </p><dl> |
579 <dt><i>url</i></dt> |
1231 <dt><i>url</i> (QUrl)</dt> |
580 <dd> |
1232 <dd> |
581 URL to extract domain from (QUrl) |
1233 URL to extract domain from |
582 </dd> |
1234 </dd> |
583 </dl><dl> |
1235 </dl><dl> |
584 <dt>Returns:</dt> |
1236 <dt>Returns:</dt> |
585 <dd> |
1237 <dd> |
586 name of second level domain (string) |
1238 name of second level domain |
|
1239 </dd> |
|
1240 </dl><dl> |
|
1241 <dt>Return Type:</dt> |
|
1242 <dd> |
|
1243 str |
587 </dd> |
1244 </dd> |
588 </dl> |
1245 </dl> |
589 <div align="right"><a href="#top">Up</a></div> |
1246 <div align="right"><a href="#top">Up</a></div> |
590 <hr /> |
1247 <hr /> |
591 </body></html> |
1248 </body></html> |