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