|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.AdBlock.AdBlockManager</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.WebBrowser.AdBlock.AdBlockManager</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the AdBlock manager. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#AdBlockManager">AdBlockManager</a></td> |
|
25 <td>Class implementing the AdBlock manager.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="AdBlockManager" ID="AdBlockManager"></a> |
|
36 <h2>AdBlockManager</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the AdBlock manager. |
|
40 </p> |
|
41 <h3>Signals</h3> |
|
42 <dl> |
|
43 |
|
44 <dt>enabledChanged(enabled)</dt> |
|
45 <dd> |
|
46 emitted to indicate a change of the |
|
47 enabled state |
|
48 </dd> |
|
49 <dt>requiredSubscriptionLoaded(subscription)</dt> |
|
50 <dd> |
|
51 emitted to indicate |
|
52 loading of a required subscription is finished (AdBlockSubscription) |
|
53 </dd> |
|
54 <dt>rulesChanged()</dt> |
|
55 <dd> |
|
56 emitted after some rule has changed |
|
57 </dd> |
|
58 </dl> |
|
59 <h3>Derived from</h3> |
|
60 QObject |
|
61 <h3>Class Attributes</h3> |
|
62 |
|
63 <table> |
|
64 <tr><td>None</td></tr> |
|
65 </table> |
|
66 <h3>Class Methods</h3> |
|
67 |
|
68 <table> |
|
69 <tr><td>None</td></tr> |
|
70 </table> |
|
71 <h3>Methods</h3> |
|
72 |
|
73 <table> |
|
74 |
|
75 <tr> |
|
76 <td><a href="#AdBlockManager.__init__">AdBlockManager</a></td> |
|
77 <td>Constructor</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#AdBlockManager.__canBeBlocked">__canBeBlocked</a></td> |
|
81 <td>Private method to check, if the given URL could be blocked (i.e.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#AdBlockManager.__customSubscriptionLocation">__customSubscriptionLocation</a></td> |
|
85 <td>Private method to generate the path for custom subscriptions.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#AdBlockManager.__customSubscriptionUrl">__customSubscriptionUrl</a></td> |
|
89 <td>Private method to generate the URL for custom subscriptions.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#AdBlockManager.__loadSubscriptions">__loadSubscriptions</a></td> |
|
93 <td>Private method to load the set of subscriptions.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#AdBlockManager.__rulesChanged">__rulesChanged</a></td> |
|
97 <td>Private slot handling a change of the AdBlock rules.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#AdBlockManager.__updateMatcher">__updateMatcher</a></td> |
|
101 <td>Private slot to update the adblock matcher.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#AdBlockManager.addException">addException</a></td> |
|
105 <td>Public method to add an exception.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#AdBlockManager.addSubscription">addSubscription</a></td> |
|
109 <td>Public method to add an AdBlock subscription.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#AdBlockManager.addSubscriptionFromUrl">addSubscriptionFromUrl</a></td> |
|
113 <td>Public method to ad an AdBlock subscription given the abp URL.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#AdBlockManager.block">block</a></td> |
|
117 <td>Public method to check, if a request should be blocked.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#AdBlockManager.canRunOnScheme">canRunOnScheme</a></td> |
|
121 <td>Public method to check, if AdBlock can be performed on the scheme.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#AdBlockManager.close">close</a></td> |
|
125 <td>Public method to close the open search engines manager.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#AdBlockManager.customRules">customRules</a></td> |
|
129 <td>Public method to get a subscription for custom rules.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#AdBlockManager.elementHidingRules">elementHidingRules</a></td> |
|
133 <td>Public method to get the element hiding rules.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#AdBlockManager.elementHidingRulesForDomain">elementHidingRulesForDomain</a></td> |
|
137 <td>Public method to get the element hiding rules for a domain.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#AdBlockManager.exceptions">exceptions</a></td> |
|
141 <td>Public method to get a list of excepted hosts.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#AdBlockManager.getDefaultSubscriptionUrl">getDefaultSubscriptionUrl</a></td> |
|
145 <td>Public method to get the default subscription URL.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#AdBlockManager.getRequiresSubscriptions">getRequiresSubscriptions</a></td> |
|
149 <td>Public method to get a list of subscriptions, that require the given one.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#AdBlockManager.isEnabled">isEnabled</a></td> |
|
153 <td>Public method to check, if blocking ads is enabled.</td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><a href="#AdBlockManager.isHostExcepted">isHostExcepted</a></td> |
|
157 <td>Public slot to check, if a host is excepted.</td> |
|
158 </tr> |
|
159 <tr> |
|
160 <td><a href="#AdBlockManager.load">load</a></td> |
|
161 <td>Public method to load the AdBlock subscriptions.</td> |
|
162 </tr> |
|
163 <tr> |
|
164 <td><a href="#AdBlockManager.loadRequiredSubscription">loadRequiredSubscription</a></td> |
|
165 <td>Public method to load a subscription required by another one.</td> |
|
166 </tr> |
|
167 <tr> |
|
168 <td><a href="#AdBlockManager.page">page</a></td> |
|
169 <td>Public method to get a reference to the page block object.</td> |
|
170 </tr> |
|
171 <tr> |
|
172 <td><a href="#AdBlockManager.removeException">removeException</a></td> |
|
173 <td>Public method to remove an exception.</td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td><a href="#AdBlockManager.removeSubscription">removeSubscription</a></td> |
|
177 <td>Public method to remove an AdBlock subscription.</td> |
|
178 </tr> |
|
179 <tr> |
|
180 <td><a href="#AdBlockManager.save">save</a></td> |
|
181 <td>Public method to save the AdBlock subscriptions.</td> |
|
182 </tr> |
|
183 <tr> |
|
184 <td><a href="#AdBlockManager.setEnabled">setEnabled</a></td> |
|
185 <td>Public slot to set the enabled state.</td> |
|
186 </tr> |
|
187 <tr> |
|
188 <td><a href="#AdBlockManager.setExceptions">setExceptions</a></td> |
|
189 <td>Public method to set the list of excepted hosts.</td> |
|
190 </tr> |
|
191 <tr> |
|
192 <td><a href="#AdBlockManager.setUseLimitedEasyList">setUseLimitedEasyList</a></td> |
|
193 <td>Public method to set the limited EasyList flag.</td> |
|
194 </tr> |
|
195 <tr> |
|
196 <td><a href="#AdBlockManager.showDialog">showDialog</a></td> |
|
197 <td>Public slot to show the AdBlock subscription management dialog.</td> |
|
198 </tr> |
|
199 <tr> |
|
200 <td><a href="#AdBlockManager.showExceptionsDialog">showExceptionsDialog</a></td> |
|
201 <td>Public method to show the AdBlock Exceptions dialog.</td> |
|
202 </tr> |
|
203 <tr> |
|
204 <td><a href="#AdBlockManager.subscription">subscription</a></td> |
|
205 <td>Public method to get a subscription based on its location.</td> |
|
206 </tr> |
|
207 <tr> |
|
208 <td><a href="#AdBlockManager.subscriptions">subscriptions</a></td> |
|
209 <td>Public method to get all subscriptions.</td> |
|
210 </tr> |
|
211 <tr> |
|
212 <td><a href="#AdBlockManager.updateAllSubscriptions">updateAllSubscriptions</a></td> |
|
213 <td>Public method to update all subscriptions.</td> |
|
214 </tr> |
|
215 <tr> |
|
216 <td><a href="#AdBlockManager.useLimitedEasyList">useLimitedEasyList</a></td> |
|
217 <td>Public method to test, if limited EasyList rules shall be used.</td> |
|
218 </tr> |
|
219 </table> |
|
220 <h3>Static Methods</h3> |
|
221 |
|
222 <table> |
|
223 <tr><td>None</td></tr> |
|
224 </table> |
|
225 |
|
226 <a NAME="AdBlockManager.__init__" ID="AdBlockManager.__init__"></a> |
|
227 <h4>AdBlockManager (Constructor)</h4> |
|
228 <b>AdBlockManager</b>(<i>parent=None</i>) |
|
229 |
|
230 <p> |
|
231 Constructor |
|
232 </p> |
|
233 <dl> |
|
234 |
|
235 <dt><i>parent</i> (QObject)</dt> |
|
236 <dd> |
|
237 reference to the parent object |
|
238 </dd> |
|
239 </dl> |
|
240 <a NAME="AdBlockManager.__canBeBlocked" ID="AdBlockManager.__canBeBlocked"></a> |
|
241 <h4>AdBlockManager.__canBeBlocked</h4> |
|
242 <b>__canBeBlocked</b>(<i>url</i>) |
|
243 |
|
244 <p> |
|
245 Private method to check, if the given URL could be blocked (i.e. is |
|
246 not whitelisted). |
|
247 </p> |
|
248 <dl> |
|
249 |
|
250 <dt><i>url</i> (QUrl)</dt> |
|
251 <dd> |
|
252 URL to be checked |
|
253 </dd> |
|
254 </dl> |
|
255 <dl> |
|
256 <dt>Return:</dt> |
|
257 <dd> |
|
258 flag indicating that the given URL can be blocked |
|
259 </dd> |
|
260 </dl> |
|
261 <dl> |
|
262 <dt>Return Type:</dt> |
|
263 <dd> |
|
264 bool |
|
265 </dd> |
|
266 </dl> |
|
267 <a NAME="AdBlockManager.__customSubscriptionLocation" ID="AdBlockManager.__customSubscriptionLocation"></a> |
|
268 <h4>AdBlockManager.__customSubscriptionLocation</h4> |
|
269 <b>__customSubscriptionLocation</b>(<i></i>) |
|
270 |
|
271 <p> |
|
272 Private method to generate the path for custom subscriptions. |
|
273 </p> |
|
274 <dl> |
|
275 <dt>Return:</dt> |
|
276 <dd> |
|
277 URL for custom subscriptions |
|
278 </dd> |
|
279 </dl> |
|
280 <dl> |
|
281 <dt>Return Type:</dt> |
|
282 <dd> |
|
283 QUrl |
|
284 </dd> |
|
285 </dl> |
|
286 <a NAME="AdBlockManager.__customSubscriptionUrl" ID="AdBlockManager.__customSubscriptionUrl"></a> |
|
287 <h4>AdBlockManager.__customSubscriptionUrl</h4> |
|
288 <b>__customSubscriptionUrl</b>(<i></i>) |
|
289 |
|
290 <p> |
|
291 Private method to generate the URL for custom subscriptions. |
|
292 </p> |
|
293 <dl> |
|
294 <dt>Return:</dt> |
|
295 <dd> |
|
296 URL for custom subscriptions |
|
297 </dd> |
|
298 </dl> |
|
299 <dl> |
|
300 <dt>Return Type:</dt> |
|
301 <dd> |
|
302 QUrl |
|
303 </dd> |
|
304 </dl> |
|
305 <a NAME="AdBlockManager.__loadSubscriptions" ID="AdBlockManager.__loadSubscriptions"></a> |
|
306 <h4>AdBlockManager.__loadSubscriptions</h4> |
|
307 <b>__loadSubscriptions</b>(<i></i>) |
|
308 |
|
309 <p> |
|
310 Private method to load the set of subscriptions. |
|
311 </p> |
|
312 <a NAME="AdBlockManager.__rulesChanged" ID="AdBlockManager.__rulesChanged"></a> |
|
313 <h4>AdBlockManager.__rulesChanged</h4> |
|
314 <b>__rulesChanged</b>(<i></i>) |
|
315 |
|
316 <p> |
|
317 Private slot handling a change of the AdBlock rules. |
|
318 </p> |
|
319 <a NAME="AdBlockManager.__updateMatcher" ID="AdBlockManager.__updateMatcher"></a> |
|
320 <h4>AdBlockManager.__updateMatcher</h4> |
|
321 <b>__updateMatcher</b>(<i></i>) |
|
322 |
|
323 <p> |
|
324 Private slot to update the adblock matcher. |
|
325 </p> |
|
326 <a NAME="AdBlockManager.addException" ID="AdBlockManager.addException"></a> |
|
327 <h4>AdBlockManager.addException</h4> |
|
328 <b>addException</b>(<i>host</i>) |
|
329 |
|
330 <p> |
|
331 Public method to add an exception. |
|
332 </p> |
|
333 <dl> |
|
334 |
|
335 <dt><i>host</i> (str)</dt> |
|
336 <dd> |
|
337 to be excepted |
|
338 </dd> |
|
339 </dl> |
|
340 <a NAME="AdBlockManager.addSubscription" ID="AdBlockManager.addSubscription"></a> |
|
341 <h4>AdBlockManager.addSubscription</h4> |
|
342 <b>addSubscription</b>(<i>subscription</i>) |
|
343 |
|
344 <p> |
|
345 Public method to add an AdBlock subscription. |
|
346 </p> |
|
347 <dl> |
|
348 |
|
349 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
|
350 <dd> |
|
351 AdBlock subscription to be added |
|
352 </dd> |
|
353 </dl> |
|
354 <a NAME="AdBlockManager.addSubscriptionFromUrl" ID="AdBlockManager.addSubscriptionFromUrl"></a> |
|
355 <h4>AdBlockManager.addSubscriptionFromUrl</h4> |
|
356 <b>addSubscriptionFromUrl</b>(<i>url</i>) |
|
357 |
|
358 <p> |
|
359 Public method to ad an AdBlock subscription given the abp URL. |
|
360 </p> |
|
361 <dl> |
|
362 |
|
363 <dt><i>url</i> (QUrl)</dt> |
|
364 <dd> |
|
365 URL to subscribe an AdBlock subscription |
|
366 </dd> |
|
367 </dl> |
|
368 <dl> |
|
369 <dt>Return:</dt> |
|
370 <dd> |
|
371 flag indicating success |
|
372 </dd> |
|
373 </dl> |
|
374 <dl> |
|
375 <dt>Return Type:</dt> |
|
376 <dd> |
|
377 bool |
|
378 </dd> |
|
379 </dl> |
|
380 <a NAME="AdBlockManager.block" ID="AdBlockManager.block"></a> |
|
381 <h4>AdBlockManager.block</h4> |
|
382 <b>block</b>(<i>info</i>) |
|
383 |
|
384 <p> |
|
385 Public method to check, if a request should be blocked. |
|
386 </p> |
|
387 <dl> |
|
388 |
|
389 <dt><i>info</i> (QWebEngineUrlRequestInfo)</dt> |
|
390 <dd> |
|
391 request info object |
|
392 </dd> |
|
393 </dl> |
|
394 <dl> |
|
395 <dt>Return:</dt> |
|
396 <dd> |
|
397 flag indicating to block the request |
|
398 </dd> |
|
399 </dl> |
|
400 <dl> |
|
401 <dt>Return Type:</dt> |
|
402 <dd> |
|
403 bool |
|
404 </dd> |
|
405 </dl> |
|
406 <a NAME="AdBlockManager.canRunOnScheme" ID="AdBlockManager.canRunOnScheme"></a> |
|
407 <h4>AdBlockManager.canRunOnScheme</h4> |
|
408 <b>canRunOnScheme</b>(<i>scheme</i>) |
|
409 |
|
410 <p> |
|
411 Public method to check, if AdBlock can be performed on the scheme. |
|
412 </p> |
|
413 <dl> |
|
414 |
|
415 <dt><i>scheme</i> (str)</dt> |
|
416 <dd> |
|
417 scheme to check |
|
418 </dd> |
|
419 </dl> |
|
420 <dl> |
|
421 <dt>Return:</dt> |
|
422 <dd> |
|
423 flag indicating, that AdBlock can be performed |
|
424 </dd> |
|
425 </dl> |
|
426 <dl> |
|
427 <dt>Return Type:</dt> |
|
428 <dd> |
|
429 bool |
|
430 </dd> |
|
431 </dl> |
|
432 <a NAME="AdBlockManager.close" ID="AdBlockManager.close"></a> |
|
433 <h4>AdBlockManager.close</h4> |
|
434 <b>close</b>(<i></i>) |
|
435 |
|
436 <p> |
|
437 Public method to close the open search engines manager. |
|
438 </p> |
|
439 <a NAME="AdBlockManager.customRules" ID="AdBlockManager.customRules"></a> |
|
440 <h4>AdBlockManager.customRules</h4> |
|
441 <b>customRules</b>(<i></i>) |
|
442 |
|
443 <p> |
|
444 Public method to get a subscription for custom rules. |
|
445 </p> |
|
446 <dl> |
|
447 <dt>Return:</dt> |
|
448 <dd> |
|
449 subscription object for custom rules |
|
450 </dd> |
|
451 </dl> |
|
452 <dl> |
|
453 <dt>Return Type:</dt> |
|
454 <dd> |
|
455 AdBlockSubscription |
|
456 </dd> |
|
457 </dl> |
|
458 <a NAME="AdBlockManager.elementHidingRules" ID="AdBlockManager.elementHidingRules"></a> |
|
459 <h4>AdBlockManager.elementHidingRules</h4> |
|
460 <b>elementHidingRules</b>(<i>url</i>) |
|
461 |
|
462 <p> |
|
463 Public method to get the element hiding rules. |
|
464 </p> |
|
465 <p> |
|
466 |
|
467 </p> |
|
468 <dl> |
|
469 |
|
470 <dt><i>url</i> (QUrl)</dt> |
|
471 <dd> |
|
472 URL to get hiding rules for |
|
473 </dd> |
|
474 </dl> |
|
475 <dl> |
|
476 <dt>Return:</dt> |
|
477 <dd> |
|
478 element hiding rules |
|
479 </dd> |
|
480 </dl> |
|
481 <dl> |
|
482 <dt>Return Type:</dt> |
|
483 <dd> |
|
484 str |
|
485 </dd> |
|
486 </dl> |
|
487 <a NAME="AdBlockManager.elementHidingRulesForDomain" ID="AdBlockManager.elementHidingRulesForDomain"></a> |
|
488 <h4>AdBlockManager.elementHidingRulesForDomain</h4> |
|
489 <b>elementHidingRulesForDomain</b>(<i>url</i>) |
|
490 |
|
491 <p> |
|
492 Public method to get the element hiding rules for a domain. |
|
493 </p> |
|
494 <dl> |
|
495 |
|
496 <dt><i>url</i> (QUrl)</dt> |
|
497 <dd> |
|
498 URL to get hiding rules for |
|
499 </dd> |
|
500 </dl> |
|
501 <dl> |
|
502 <dt>Return:</dt> |
|
503 <dd> |
|
504 element hiding rules |
|
505 </dd> |
|
506 </dl> |
|
507 <dl> |
|
508 <dt>Return Type:</dt> |
|
509 <dd> |
|
510 str |
|
511 </dd> |
|
512 </dl> |
|
513 <a NAME="AdBlockManager.exceptions" ID="AdBlockManager.exceptions"></a> |
|
514 <h4>AdBlockManager.exceptions</h4> |
|
515 <b>exceptions</b>(<i></i>) |
|
516 |
|
517 <p> |
|
518 Public method to get a list of excepted hosts. |
|
519 </p> |
|
520 <dl> |
|
521 <dt>Return:</dt> |
|
522 <dd> |
|
523 list of excepted hosts |
|
524 </dd> |
|
525 </dl> |
|
526 <dl> |
|
527 <dt>Return Type:</dt> |
|
528 <dd> |
|
529 list of str |
|
530 </dd> |
|
531 </dl> |
|
532 <a NAME="AdBlockManager.getDefaultSubscriptionUrl" ID="AdBlockManager.getDefaultSubscriptionUrl"></a> |
|
533 <h4>AdBlockManager.getDefaultSubscriptionUrl</h4> |
|
534 <b>getDefaultSubscriptionUrl</b>(<i></i>) |
|
535 |
|
536 <p> |
|
537 Public method to get the default subscription URL. |
|
538 </p> |
|
539 <dl> |
|
540 <dt>Return:</dt> |
|
541 <dd> |
|
542 default subscription URL |
|
543 </dd> |
|
544 </dl> |
|
545 <dl> |
|
546 <dt>Return Type:</dt> |
|
547 <dd> |
|
548 str |
|
549 </dd> |
|
550 </dl> |
|
551 <a NAME="AdBlockManager.getRequiresSubscriptions" ID="AdBlockManager.getRequiresSubscriptions"></a> |
|
552 <h4>AdBlockManager.getRequiresSubscriptions</h4> |
|
553 <b>getRequiresSubscriptions</b>(<i>subscription</i>) |
|
554 |
|
555 <p> |
|
556 Public method to get a list of subscriptions, that require the given |
|
557 one. |
|
558 </p> |
|
559 <dl> |
|
560 |
|
561 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
|
562 <dd> |
|
563 subscription to check for |
|
564 </dd> |
|
565 </dl> |
|
566 <dl> |
|
567 <dt>Return:</dt> |
|
568 <dd> |
|
569 list of subscription requiring the given one |
|
570 </dd> |
|
571 </dl> |
|
572 <dl> |
|
573 <dt>Return Type:</dt> |
|
574 <dd> |
|
575 list of AdBlockSubscription |
|
576 </dd> |
|
577 </dl> |
|
578 <a NAME="AdBlockManager.isEnabled" ID="AdBlockManager.isEnabled"></a> |
|
579 <h4>AdBlockManager.isEnabled</h4> |
|
580 <b>isEnabled</b>(<i></i>) |
|
581 |
|
582 <p> |
|
583 Public method to check, if blocking ads is enabled. |
|
584 </p> |
|
585 <dl> |
|
586 <dt>Return:</dt> |
|
587 <dd> |
|
588 flag indicating the enabled state |
|
589 </dd> |
|
590 </dl> |
|
591 <dl> |
|
592 <dt>Return Type:</dt> |
|
593 <dd> |
|
594 bool |
|
595 </dd> |
|
596 </dl> |
|
597 <a NAME="AdBlockManager.isHostExcepted" ID="AdBlockManager.isHostExcepted"></a> |
|
598 <h4>AdBlockManager.isHostExcepted</h4> |
|
599 <b>isHostExcepted</b>(<i>host</i>) |
|
600 |
|
601 <p> |
|
602 Public slot to check, if a host is excepted. |
|
603 </p> |
|
604 <dl> |
|
605 |
|
606 <dt><i>host</i> (str)</dt> |
|
607 <dd> |
|
608 host to check |
|
609 </dd> |
|
610 </dl> |
|
611 <dl> |
|
612 <dt>Return:</dt> |
|
613 <dd> |
|
614 flag indicating an exception |
|
615 </dd> |
|
616 </dl> |
|
617 <dl> |
|
618 <dt>Return Type:</dt> |
|
619 <dd> |
|
620 bool |
|
621 </dd> |
|
622 </dl> |
|
623 <a NAME="AdBlockManager.load" ID="AdBlockManager.load"></a> |
|
624 <h4>AdBlockManager.load</h4> |
|
625 <b>load</b>(<i></i>) |
|
626 |
|
627 <p> |
|
628 Public method to load the AdBlock subscriptions. |
|
629 </p> |
|
630 <a NAME="AdBlockManager.loadRequiredSubscription" ID="AdBlockManager.loadRequiredSubscription"></a> |
|
631 <h4>AdBlockManager.loadRequiredSubscription</h4> |
|
632 <b>loadRequiredSubscription</b>(<i>location, title</i>) |
|
633 |
|
634 <p> |
|
635 Public method to load a subscription required by another one. |
|
636 </p> |
|
637 <dl> |
|
638 |
|
639 <dt><i>location</i> (str)</dt> |
|
640 <dd> |
|
641 location of the required subscription |
|
642 </dd> |
|
643 <dt><i>title</i> (str)</dt> |
|
644 <dd> |
|
645 title of the required subscription |
|
646 </dd> |
|
647 </dl> |
|
648 <a NAME="AdBlockManager.page" ID="AdBlockManager.page"></a> |
|
649 <h4>AdBlockManager.page</h4> |
|
650 <b>page</b>(<i></i>) |
|
651 |
|
652 <p> |
|
653 Public method to get a reference to the page block object. |
|
654 </p> |
|
655 <dl> |
|
656 <dt>Return:</dt> |
|
657 <dd> |
|
658 reference to the page block object |
|
659 </dd> |
|
660 </dl> |
|
661 <dl> |
|
662 <dt>Return Type:</dt> |
|
663 <dd> |
|
664 AdBlockPage |
|
665 </dd> |
|
666 </dl> |
|
667 <a NAME="AdBlockManager.removeException" ID="AdBlockManager.removeException"></a> |
|
668 <h4>AdBlockManager.removeException</h4> |
|
669 <b>removeException</b>(<i>host</i>) |
|
670 |
|
671 <p> |
|
672 Public method to remove an exception. |
|
673 </p> |
|
674 <dl> |
|
675 |
|
676 <dt><i>host</i> (str)</dt> |
|
677 <dd> |
|
678 to be removed from the list of exceptions |
|
679 </dd> |
|
680 </dl> |
|
681 <a NAME="AdBlockManager.removeSubscription" ID="AdBlockManager.removeSubscription"></a> |
|
682 <h4>AdBlockManager.removeSubscription</h4> |
|
683 <b>removeSubscription</b>(<i>subscription, emitSignal=True</i>) |
|
684 |
|
685 <p> |
|
686 Public method to remove an AdBlock subscription. |
|
687 </p> |
|
688 <dl> |
|
689 |
|
690 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
|
691 <dd> |
|
692 AdBlock subscription to be removed |
|
693 </dd> |
|
694 <dt><i>emitSignal</i> (bool)</dt> |
|
695 <dd> |
|
696 flag indicating to send a signal |
|
697 </dd> |
|
698 </dl> |
|
699 <a NAME="AdBlockManager.save" ID="AdBlockManager.save"></a> |
|
700 <h4>AdBlockManager.save</h4> |
|
701 <b>save</b>(<i></i>) |
|
702 |
|
703 <p> |
|
704 Public method to save the AdBlock subscriptions. |
|
705 </p> |
|
706 <a NAME="AdBlockManager.setEnabled" ID="AdBlockManager.setEnabled"></a> |
|
707 <h4>AdBlockManager.setEnabled</h4> |
|
708 <b>setEnabled</b>(<i>enabled</i>) |
|
709 |
|
710 <p> |
|
711 Public slot to set the enabled state. |
|
712 </p> |
|
713 <dl> |
|
714 |
|
715 <dt><i>enabled</i> (bool)</dt> |
|
716 <dd> |
|
717 flag indicating the enabled state |
|
718 </dd> |
|
719 </dl> |
|
720 <a NAME="AdBlockManager.setExceptions" ID="AdBlockManager.setExceptions"></a> |
|
721 <h4>AdBlockManager.setExceptions</h4> |
|
722 <b>setExceptions</b>(<i>hosts</i>) |
|
723 |
|
724 <p> |
|
725 Public method to set the list of excepted hosts. |
|
726 </p> |
|
727 <dl> |
|
728 |
|
729 <dt><i>hosts</i> (list of str)</dt> |
|
730 <dd> |
|
731 list of excepted hosts |
|
732 </dd> |
|
733 </dl> |
|
734 <a NAME="AdBlockManager.setUseLimitedEasyList" ID="AdBlockManager.setUseLimitedEasyList"></a> |
|
735 <h4>AdBlockManager.setUseLimitedEasyList</h4> |
|
736 <b>setUseLimitedEasyList</b>(<i>limited</i>) |
|
737 |
|
738 <p> |
|
739 Public method to set the limited EasyList flag. |
|
740 </p> |
|
741 <dl> |
|
742 |
|
743 <dt><i>limited</i> (bool)</dt> |
|
744 <dd> |
|
745 flag indicating to use limited EasyList |
|
746 </dd> |
|
747 </dl> |
|
748 <a NAME="AdBlockManager.showDialog" ID="AdBlockManager.showDialog"></a> |
|
749 <h4>AdBlockManager.showDialog</h4> |
|
750 <b>showDialog</b>(<i></i>) |
|
751 |
|
752 <p> |
|
753 Public slot to show the AdBlock subscription management dialog. |
|
754 </p> |
|
755 <dl> |
|
756 <dt>Return:</dt> |
|
757 <dd> |
|
758 reference to the dialog |
|
759 </dd> |
|
760 </dl> |
|
761 <dl> |
|
762 <dt>Return Type:</dt> |
|
763 <dd> |
|
764 AdBlockDialog |
|
765 </dd> |
|
766 </dl> |
|
767 <a NAME="AdBlockManager.showExceptionsDialog" ID="AdBlockManager.showExceptionsDialog"></a> |
|
768 <h4>AdBlockManager.showExceptionsDialog</h4> |
|
769 <b>showExceptionsDialog</b>(<i></i>) |
|
770 |
|
771 <p> |
|
772 Public method to show the AdBlock Exceptions dialog. |
|
773 </p> |
|
774 <dl> |
|
775 <dt>Return:</dt> |
|
776 <dd> |
|
777 reference to the exceptions dialog |
|
778 </dd> |
|
779 </dl> |
|
780 <dl> |
|
781 <dt>Return Type:</dt> |
|
782 <dd> |
|
783 AdBlockExceptionsDialog |
|
784 </dd> |
|
785 </dl> |
|
786 <a NAME="AdBlockManager.subscription" ID="AdBlockManager.subscription"></a> |
|
787 <h4>AdBlockManager.subscription</h4> |
|
788 <b>subscription</b>(<i>location</i>) |
|
789 |
|
790 <p> |
|
791 Public method to get a subscription based on its location. |
|
792 </p> |
|
793 <dl> |
|
794 |
|
795 <dt><i>location</i> (str)</dt> |
|
796 <dd> |
|
797 location of the subscription to search for |
|
798 </dd> |
|
799 </dl> |
|
800 <dl> |
|
801 <dt>Return:</dt> |
|
802 <dd> |
|
803 subscription or None |
|
804 </dd> |
|
805 </dl> |
|
806 <dl> |
|
807 <dt>Return Type:</dt> |
|
808 <dd> |
|
809 AdBlockSubscription |
|
810 </dd> |
|
811 </dl> |
|
812 <a NAME="AdBlockManager.subscriptions" ID="AdBlockManager.subscriptions"></a> |
|
813 <h4>AdBlockManager.subscriptions</h4> |
|
814 <b>subscriptions</b>(<i></i>) |
|
815 |
|
816 <p> |
|
817 Public method to get all subscriptions. |
|
818 </p> |
|
819 <dl> |
|
820 <dt>Return:</dt> |
|
821 <dd> |
|
822 list of subscriptions |
|
823 </dd> |
|
824 </dl> |
|
825 <dl> |
|
826 <dt>Return Type:</dt> |
|
827 <dd> |
|
828 list of AdBlockSubscription |
|
829 </dd> |
|
830 </dl> |
|
831 <a NAME="AdBlockManager.updateAllSubscriptions" ID="AdBlockManager.updateAllSubscriptions"></a> |
|
832 <h4>AdBlockManager.updateAllSubscriptions</h4> |
|
833 <b>updateAllSubscriptions</b>(<i></i>) |
|
834 |
|
835 <p> |
|
836 Public method to update all subscriptions. |
|
837 </p> |
|
838 <a NAME="AdBlockManager.useLimitedEasyList" ID="AdBlockManager.useLimitedEasyList"></a> |
|
839 <h4>AdBlockManager.useLimitedEasyList</h4> |
|
840 <b>useLimitedEasyList</b>(<i></i>) |
|
841 |
|
842 <p> |
|
843 Public method to test, if limited EasyList rules shall be used. |
|
844 </p> |
|
845 <dl> |
|
846 <dt>Return:</dt> |
|
847 <dd> |
|
848 flag indicating limited EasyList rules |
|
849 </dd> |
|
850 </dl> |
|
851 <dl> |
|
852 <dt>Return Type:</dt> |
|
853 <dd> |
|
854 bool |
|
855 </dd> |
|
856 </dl> |
|
857 <div align="right"><a href="#top">Up</a></div> |
|
858 <hr /> |
|
859 </body></html> |