16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.WebBrowser.AdBlock.AdBlockRule</h1> |
23 <h1>eric6.WebBrowser.AdBlock.AdBlockRule</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing the AdBlock rule class. |
26 Module implementing the AdBlock rule class. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
|
34 |
31 <table> |
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#AdBlockRule">AdBlockRule</a></td> |
38 <td><a href="#AdBlockRule">AdBlockRule</a></td> |
34 <td>Class implementing the AdBlock rule.</td> |
39 <td>Class implementing the AdBlock rule.</td> |
35 </tr><tr> |
40 </tr> |
|
41 <tr> |
36 <td><a href="#AdBlockRuleOption">AdBlockRuleOption</a></td> |
42 <td><a href="#AdBlockRuleOption">AdBlockRuleOption</a></td> |
37 <td>Class implementing the rule option enum.</td> |
43 <td>Class implementing the rule option enum.</td> |
38 </tr><tr> |
44 </tr> |
|
45 <tr> |
39 <td><a href="#AdBlockRuleType">AdBlockRuleType</a></td> |
46 <td><a href="#AdBlockRuleType">AdBlockRuleType</a></td> |
40 <td>Class implementing the rule type enum.</td> |
47 <td>Class implementing the rule type enum.</td> |
41 </tr> |
48 </tr> |
42 </table> |
49 </table> |
43 <h3>Functions</h3> |
50 <h3>Functions</h3> |
|
51 |
44 <table> |
52 <table> |
|
53 |
45 <tr> |
54 <tr> |
46 <td><a href="#toSecondLevelDomain">toSecondLevelDomain</a></td> |
55 <td><a href="#toSecondLevelDomain">toSecondLevelDomain</a></td> |
47 <td>Module function to get a second level domain from the given URL.</td> |
56 <td>Module function to get a second level domain from the given URL.</td> |
48 </tr> |
57 </tr> |
49 </table> |
58 </table> |
50 <hr /><hr /> |
59 <hr /> |
|
60 <hr /> |
51 <a NAME="AdBlockRule" ID="AdBlockRule"></a> |
61 <a NAME="AdBlockRule" ID="AdBlockRule"></a> |
52 <h2>AdBlockRule</h2> |
62 <h2>AdBlockRule</h2> |
|
63 |
53 <p> |
64 <p> |
54 Class implementing the AdBlock rule. |
65 Class implementing the AdBlock rule. |
55 </p> |
66 </p> |
56 <h3>Derived from</h3> |
67 <h3>Derived from</h3> |
57 object |
68 object |
58 <h3>Class Attributes</h3> |
69 <h3>Class Attributes</h3> |
|
70 |
59 <table> |
71 <table> |
60 <tr><td>None</td></tr> |
72 <tr><td>None</td></tr> |
61 </table> |
73 </table> |
62 <h3>Class Methods</h3> |
74 <h3>Class Methods</h3> |
|
75 |
63 <table> |
76 <table> |
64 <tr><td>None</td></tr> |
77 <tr><td>None</td></tr> |
65 </table> |
78 </table> |
66 <h3>Methods</h3> |
79 <h3>Methods</h3> |
|
80 |
67 <table> |
81 <table> |
|
82 |
68 <tr> |
83 <tr> |
69 <td><a href="#AdBlockRule.__init__">AdBlockRule</a></td> |
84 <td><a href="#AdBlockRule.__init__">AdBlockRule</a></td> |
70 <td>Constructor</td> |
85 <td>Constructor</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#AdBlockRule.__convertPatternToRegExp">__convertPatternToRegExp</a></td> |
88 <td><a href="#AdBlockRule.__convertPatternToRegExp">__convertPatternToRegExp</a></td> |
73 <td>Private method to convert a wildcard pattern to a regular expression.</td> |
89 <td>Private method to convert a wildcard pattern to a regular expression.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#AdBlockRule.__filterIsOnlyDomain">__filterIsOnlyDomain</a></td> |
92 <td><a href="#AdBlockRule.__filterIsOnlyDomain">__filterIsOnlyDomain</a></td> |
76 <td>Private method to check, if the given filter is a domain only filter.</td> |
93 <td>Private method to check, if the given filter is a domain only filter.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#AdBlockRule.__filterIsOnlyEndsMatch">__filterIsOnlyEndsMatch</a></td> |
96 <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> |
97 <td>Private method to check, if the given filter is to match against the end of a string.</td> |
80 </tr><tr> |
98 </tr> |
|
99 <tr> |
81 <td><a href="#AdBlockRule.__hasException">__hasException</a></td> |
100 <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> |
101 <td>Private method to check, if the given option has been set as an exception.</td> |
83 </tr><tr> |
102 </tr> |
|
103 <tr> |
84 <td><a href="#AdBlockRule.__hasOption">__hasOption</a></td> |
104 <td><a href="#AdBlockRule.__hasOption">__hasOption</a></td> |
85 <td>Private method to check, if the given option has been set.</td> |
105 <td>Private method to check, if the given option has been set.</td> |
86 </tr><tr> |
106 </tr> |
|
107 <tr> |
87 <td><a href="#AdBlockRule.__isMatchingDomain">__isMatchingDomain</a></td> |
108 <td><a href="#AdBlockRule.__isMatchingDomain">__isMatchingDomain</a></td> |
88 <td>Private method to check, if a given domain matches the given filter string.</td> |
109 <td>Private method to check, if a given domain matches the given filter string.</td> |
89 </tr><tr> |
110 </tr> |
|
111 <tr> |
90 <td><a href="#AdBlockRule.__isMatchingRegExpStrings">__isMatchingRegExpStrings</a></td> |
112 <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> |
113 <td>Private method to check the given URL against the fixed parts of the regexp.</td> |
92 </tr><tr> |
114 </tr> |
|
115 <tr> |
93 <td><a href="#AdBlockRule.__parseDomains">__parseDomains</a></td> |
116 <td><a href="#AdBlockRule.__parseDomains">__parseDomains</a></td> |
94 <td>Private method to parse a string with a domain list.</td> |
117 <td>Private method to parse a string with a domain list.</td> |
95 </tr><tr> |
118 </tr> |
|
119 <tr> |
96 <td><a href="#AdBlockRule.__parseFilter">__parseFilter</a></td> |
120 <td><a href="#AdBlockRule.__parseFilter">__parseFilter</a></td> |
97 <td>Private method to parse the filter pattern.</td> |
121 <td>Private method to parse the filter pattern.</td> |
98 </tr><tr> |
122 </tr> |
|
123 <tr> |
99 <td><a href="#AdBlockRule.__parseRegExpFilter">__parseRegExpFilter</a></td> |
124 <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> |
125 <td>Private method to split the given regular expression into strings that can be used with 'in'.</td> |
101 </tr><tr> |
126 </tr> |
|
127 <tr> |
102 <td><a href="#AdBlockRule.__setException">__setException</a></td> |
128 <td><a href="#AdBlockRule.__setException">__setException</a></td> |
103 <td>Private method to set the given option as an exception.</td> |
129 <td>Private method to set the given option as an exception.</td> |
104 </tr><tr> |
130 </tr> |
|
131 <tr> |
105 <td><a href="#AdBlockRule.__stringMatch">__stringMatch</a></td> |
132 <td><a href="#AdBlockRule.__stringMatch">__stringMatch</a></td> |
106 <td>Private method to match a domain string.</td> |
133 <td>Private method to match a domain string.</td> |
107 </tr><tr> |
134 </tr> |
|
135 <tr> |
108 <td><a href="#AdBlockRule.addBlockedDomains">addBlockedDomains</a></td> |
136 <td><a href="#AdBlockRule.addBlockedDomains">addBlockedDomains</a></td> |
109 <td>Public method to add to the list of blocked domains.</td> |
137 <td>Public method to add to the list of blocked domains.</td> |
110 </tr><tr> |
138 </tr> |
|
139 <tr> |
111 <td><a href="#AdBlockRule.allowedDomains">allowedDomains</a></td> |
140 <td><a href="#AdBlockRule.allowedDomains">allowedDomains</a></td> |
112 <td>Public method to get a copy of the list of allowed domains.</td> |
141 <td>Public method to get a copy of the list of allowed domains.</td> |
113 </tr><tr> |
142 </tr> |
|
143 <tr> |
114 <td><a href="#AdBlockRule.blockedDomains">blockedDomains</a></td> |
144 <td><a href="#AdBlockRule.blockedDomains">blockedDomains</a></td> |
115 <td>Public method to get a copy of the list of blocked domains.</td> |
145 <td>Public method to get a copy of the list of blocked domains.</td> |
116 </tr><tr> |
146 </tr> |
|
147 <tr> |
117 <td><a href="#AdBlockRule.caseSensitivity">caseSensitivity</a></td> |
148 <td><a href="#AdBlockRule.caseSensitivity">caseSensitivity</a></td> |
118 <td>Public method to get the case sensitivity.</td> |
149 <td>Public method to get the case sensitivity.</td> |
119 </tr><tr> |
150 </tr> |
|
151 <tr> |
120 <td><a href="#AdBlockRule.copyFrom">copyFrom</a></td> |
152 <td><a href="#AdBlockRule.copyFrom">copyFrom</a></td> |
121 <td>Public method to copy another AdBlock rule.</td> |
153 <td>Public method to copy another AdBlock rule.</td> |
122 </tr><tr> |
154 </tr> |
|
155 <tr> |
123 <td><a href="#AdBlockRule.cssSelector">cssSelector</a></td> |
156 <td><a href="#AdBlockRule.cssSelector">cssSelector</a></td> |
124 <td>Public method to get the CSS selector of the rule.</td> |
157 <td>Public method to get the CSS selector of the rule.</td> |
125 </tr><tr> |
158 </tr> |
|
159 <tr> |
126 <td><a href="#AdBlockRule.filter">filter</a></td> |
160 <td><a href="#AdBlockRule.filter">filter</a></td> |
127 <td>Public method to get the rule filter string.</td> |
161 <td>Public method to get the rule filter string.</td> |
128 </tr><tr> |
162 </tr> |
|
163 <tr> |
129 <td><a href="#AdBlockRule.getRegExpAndMatchers">getRegExpAndMatchers</a></td> |
164 <td><a href="#AdBlockRule.getRegExpAndMatchers">getRegExpAndMatchers</a></td> |
130 <td>Public method to get the regular expression and associated string matchers.</td> |
165 <td>Public method to get the regular expression and associated string matchers.</td> |
131 </tr><tr> |
166 </tr> |
|
167 <tr> |
132 <td><a href="#AdBlockRule.isCSSRule">isCSSRule</a></td> |
168 <td><a href="#AdBlockRule.isCSSRule">isCSSRule</a></td> |
133 <td>Public method to check, if the rule is a CSS rule.</td> |
169 <td>Public method to check, if the rule is a CSS rule.</td> |
134 </tr><tr> |
170 </tr> |
|
171 <tr> |
135 <td><a href="#AdBlockRule.isComment">isComment</a></td> |
172 <td><a href="#AdBlockRule.isComment">isComment</a></td> |
136 <td>Public method to check, if this is a comment.</td> |
173 <td>Public method to check, if this is a comment.</td> |
137 </tr><tr> |
174 </tr> |
|
175 <tr> |
138 <td><a href="#AdBlockRule.isDocument">isDocument</a></td> |
176 <td><a href="#AdBlockRule.isDocument">isDocument</a></td> |
139 <td>Public method to check, if this is a document rule.</td> |
177 <td>Public method to check, if this is a document rule.</td> |
140 </tr><tr> |
178 </tr> |
|
179 <tr> |
141 <td><a href="#AdBlockRule.isDomainRestricted">isDomainRestricted</a></td> |
180 <td><a href="#AdBlockRule.isDomainRestricted">isDomainRestricted</a></td> |
142 <td>Public method to check, if this rule is restricted by domain.</td> |
181 <td>Public method to check, if this rule is restricted by domain.</td> |
143 </tr><tr> |
182 </tr> |
|
183 <tr> |
144 <td><a href="#AdBlockRule.isElementHiding">isElementHiding</a></td> |
184 <td><a href="#AdBlockRule.isElementHiding">isElementHiding</a></td> |
145 <td>Public method to check, if this is an element hiding rule.</td> |
185 <td>Public method to check, if this is an element hiding rule.</td> |
146 </tr><tr> |
186 </tr> |
|
187 <tr> |
147 <td><a href="#AdBlockRule.isEnabled">isEnabled</a></td> |
188 <td><a href="#AdBlockRule.isEnabled">isEnabled</a></td> |
148 <td>Public method to check, if the rule is enabled.</td> |
189 <td>Public method to check, if the rule is enabled.</td> |
149 </tr><tr> |
190 </tr> |
|
191 <tr> |
150 <td><a href="#AdBlockRule.isException">isException</a></td> |
192 <td><a href="#AdBlockRule.isException">isException</a></td> |
151 <td>Public method to check, if the rule defines an exception.</td> |
193 <td>Public method to check, if the rule defines an exception.</td> |
152 </tr><tr> |
194 </tr> |
|
195 <tr> |
153 <td><a href="#AdBlockRule.isHeader">isHeader</a></td> |
196 <td><a href="#AdBlockRule.isHeader">isHeader</a></td> |
154 <td>Public method to check, if this is a header.</td> |
197 <td>Public method to check, if this is a header.</td> |
155 </tr><tr> |
198 </tr> |
|
199 <tr> |
156 <td><a href="#AdBlockRule.isInternalDisabled">isInternalDisabled</a></td> |
200 <td><a href="#AdBlockRule.isInternalDisabled">isInternalDisabled</a></td> |
157 <td>Public method to check, if this rule was disabled internally.</td> |
201 <td>Public method to check, if this rule was disabled internally.</td> |
158 </tr><tr> |
202 </tr> |
|
203 <tr> |
159 <td><a href="#AdBlockRule.isSlow">isSlow</a></td> |
204 <td><a href="#AdBlockRule.isSlow">isSlow</a></td> |
160 <td>Public method to check, if this is a slow rule.</td> |
205 <td>Public method to check, if this is a slow rule.</td> |
161 </tr><tr> |
206 </tr> |
|
207 <tr> |
162 <td><a href="#AdBlockRule.matchDomain">matchDomain</a></td> |
208 <td><a href="#AdBlockRule.matchDomain">matchDomain</a></td> |
163 <td>Public method to match a domain.</td> |
209 <td>Public method to match a domain.</td> |
164 </tr><tr> |
210 </tr> |
|
211 <tr> |
165 <td><a href="#AdBlockRule.matchFont">matchFont</a></td> |
212 <td><a href="#AdBlockRule.matchFont">matchFont</a></td> |
166 <td>Public method to match a Font rule.</td> |
213 <td>Public method to match a Font rule.</td> |
167 </tr><tr> |
214 </tr> |
|
215 <tr> |
168 <td><a href="#AdBlockRule.matchImage">matchImage</a></td> |
216 <td><a href="#AdBlockRule.matchImage">matchImage</a></td> |
169 <td>Public method to match an Image rule.</td> |
217 <td>Public method to match an Image rule.</td> |
170 </tr><tr> |
218 </tr> |
|
219 <tr> |
171 <td><a href="#AdBlockRule.matchMedia">matchMedia</a></td> |
220 <td><a href="#AdBlockRule.matchMedia">matchMedia</a></td> |
172 <td>Public method to match a Media rule.</td> |
221 <td>Public method to match a Media rule.</td> |
173 </tr><tr> |
222 </tr> |
|
223 <tr> |
174 <td><a href="#AdBlockRule.matchObject">matchObject</a></td> |
224 <td><a href="#AdBlockRule.matchObject">matchObject</a></td> |
175 <td>Public method to match an object rule.</td> |
225 <td>Public method to match an object rule.</td> |
176 </tr><tr> |
226 </tr> |
|
227 <tr> |
177 <td><a href="#AdBlockRule.matchObjectSubrequest">matchObjectSubrequest</a></td> |
228 <td><a href="#AdBlockRule.matchObjectSubrequest">matchObjectSubrequest</a></td> |
178 <td>Public method to match an Object Subrequest rule.</td> |
229 <td>Public method to match an Object Subrequest rule.</td> |
179 </tr><tr> |
230 </tr> |
|
231 <tr> |
180 <td><a href="#AdBlockRule.matchOther">matchOther</a></td> |
232 <td><a href="#AdBlockRule.matchOther">matchOther</a></td> |
181 <td>Public method to match any other rule.</td> |
233 <td>Public method to match any other rule.</td> |
182 </tr><tr> |
234 </tr> |
|
235 <tr> |
183 <td><a href="#AdBlockRule.matchPing">matchPing</a></td> |
236 <td><a href="#AdBlockRule.matchPing">matchPing</a></td> |
184 <td>Public method to match a Ping rule.</td> |
237 <td>Public method to match a Ping rule.</td> |
185 </tr><tr> |
238 </tr> |
|
239 <tr> |
186 <td><a href="#AdBlockRule.matchScript">matchScript</a></td> |
240 <td><a href="#AdBlockRule.matchScript">matchScript</a></td> |
187 <td>Public method to match a Script rule.</td> |
241 <td>Public method to match a Script rule.</td> |
188 </tr><tr> |
242 </tr> |
|
243 <tr> |
189 <td><a href="#AdBlockRule.matchString">matchString</a></td> |
244 <td><a href="#AdBlockRule.matchString">matchString</a></td> |
190 <td>Public method to get the match string.</td> |
245 <td>Public method to get the match string.</td> |
191 </tr><tr> |
246 </tr> |
|
247 <tr> |
192 <td><a href="#AdBlockRule.matchStyleSheet">matchStyleSheet</a></td> |
248 <td><a href="#AdBlockRule.matchStyleSheet">matchStyleSheet</a></td> |
193 <td>Public method to match a StyleSheet rule.</td> |
249 <td>Public method to match a StyleSheet rule.</td> |
194 </tr><tr> |
250 </tr> |
|
251 <tr> |
195 <td><a href="#AdBlockRule.matchSubdocument">matchSubdocument</a></td> |
252 <td><a href="#AdBlockRule.matchSubdocument">matchSubdocument</a></td> |
196 <td>Public method to match a sub-document rule.</td> |
253 <td>Public method to match a sub-document rule.</td> |
197 </tr><tr> |
254 </tr> |
|
255 <tr> |
198 <td><a href="#AdBlockRule.matchThirdParty">matchThirdParty</a></td> |
256 <td><a href="#AdBlockRule.matchThirdParty">matchThirdParty</a></td> |
199 <td>Public method to match a third-party rule.</td> |
257 <td>Public method to match a third-party rule.</td> |
200 </tr><tr> |
258 </tr> |
|
259 <tr> |
201 <td><a href="#AdBlockRule.matchXmlHttpRequest">matchXmlHttpRequest</a></td> |
260 <td><a href="#AdBlockRule.matchXmlHttpRequest">matchXmlHttpRequest</a></td> |
202 <td>Public method to match a XmlHttpRequest rule.</td> |
261 <td>Public method to match a XmlHttpRequest rule.</td> |
203 </tr><tr> |
262 </tr> |
|
263 <tr> |
204 <td><a href="#AdBlockRule.networkMatch">networkMatch</a></td> |
264 <td><a href="#AdBlockRule.networkMatch">networkMatch</a></td> |
205 <td>Public method to check the rule for a match.</td> |
265 <td>Public method to check the rule for a match.</td> |
206 </tr><tr> |
266 </tr> |
|
267 <tr> |
207 <td><a href="#AdBlockRule.ruleExceptions">ruleExceptions</a></td> |
268 <td><a href="#AdBlockRule.ruleExceptions">ruleExceptions</a></td> |
208 <td>Public method to get the rule exceptions.</td> |
269 <td>Public method to get the rule exceptions.</td> |
209 </tr><tr> |
270 </tr> |
|
271 <tr> |
210 <td><a href="#AdBlockRule.ruleOptions">ruleOptions</a></td> |
272 <td><a href="#AdBlockRule.ruleOptions">ruleOptions</a></td> |
211 <td>Public method to get the rule options.</td> |
273 <td>Public method to get the rule options.</td> |
212 </tr><tr> |
274 </tr> |
|
275 <tr> |
213 <td><a href="#AdBlockRule.ruleType">ruleType</a></td> |
276 <td><a href="#AdBlockRule.ruleType">ruleType</a></td> |
214 <td>Public method to get the rule type.</td> |
277 <td>Public method to get the rule type.</td> |
215 </tr><tr> |
278 </tr> |
|
279 <tr> |
216 <td><a href="#AdBlockRule.setEnabled">setEnabled</a></td> |
280 <td><a href="#AdBlockRule.setEnabled">setEnabled</a></td> |
217 <td>Public method to set the rule's enabled state.</td> |
281 <td>Public method to set the rule's enabled state.</td> |
218 </tr><tr> |
282 </tr> |
|
283 <tr> |
219 <td><a href="#AdBlockRule.setException">setException</a></td> |
284 <td><a href="#AdBlockRule.setException">setException</a></td> |
220 <td>Public method to set the rule's exception flag.</td> |
285 <td>Public method to set the rule's exception flag.</td> |
221 </tr><tr> |
286 </tr> |
|
287 <tr> |
222 <td><a href="#AdBlockRule.setFilter">setFilter</a></td> |
288 <td><a href="#AdBlockRule.setFilter">setFilter</a></td> |
223 <td>Public method to set the rule filter string.</td> |
289 <td>Public method to set the rule filter string.</td> |
224 </tr><tr> |
290 </tr> |
|
291 <tr> |
225 <td><a href="#AdBlockRule.setOption">setOption</a></td> |
292 <td><a href="#AdBlockRule.setOption">setOption</a></td> |
226 <td>Public method to set the given option.</td> |
293 <td>Public method to set the given option.</td> |
227 </tr><tr> |
294 </tr> |
|
295 <tr> |
228 <td><a href="#AdBlockRule.setSubscription">setSubscription</a></td> |
296 <td><a href="#AdBlockRule.setSubscription">setSubscription</a></td> |
229 <td>Public method to set the subscription this rule belongs to.</td> |
297 <td>Public method to set the subscription this rule belongs to.</td> |
230 </tr><tr> |
298 </tr> |
|
299 <tr> |
231 <td><a href="#AdBlockRule.subscription">subscription</a></td> |
300 <td><a href="#AdBlockRule.subscription">subscription</a></td> |
232 <td>Public method to get the subscription this rule belongs to.</td> |
301 <td>Public method to get the subscription this rule belongs to.</td> |
233 </tr><tr> |
302 </tr> |
|
303 <tr> |
234 <td><a href="#AdBlockRule.urlMatch">urlMatch</a></td> |
304 <td><a href="#AdBlockRule.urlMatch">urlMatch</a></td> |
235 <td>Public method to check an URL against the rule.</td> |
305 <td>Public method to check an URL against the rule.</td> |
236 </tr> |
306 </tr> |
237 </table> |
307 </table> |
238 <h3>Static Methods</h3> |
308 <h3>Static Methods</h3> |
|
309 |
239 <table> |
310 <table> |
240 <tr><td>None</td></tr> |
311 <tr><td>None</td></tr> |
241 </table> |
312 </table> |
|
313 |
242 <a NAME="AdBlockRule.__init__" ID="AdBlockRule.__init__"></a> |
314 <a NAME="AdBlockRule.__init__" ID="AdBlockRule.__init__"></a> |
243 <h4>AdBlockRule (Constructor)</h4> |
315 <h4>AdBlockRule (Constructor)</h4> |
244 <b>AdBlockRule</b>(<i>filterRule="", subscription=None</i>) |
316 <b>AdBlockRule</b>(<i>filterRule="", subscription=None</i>) |
|
317 |
245 <p> |
318 <p> |
246 Constructor |
319 Constructor |
247 </p><dl> |
320 </p> |
|
321 <dl> |
|
322 |
248 <dt><i>filterRule</i> (str)</dt> |
323 <dt><i>filterRule</i> (str)</dt> |
249 <dd> |
324 <dd> |
250 filter string of the rule |
325 filter string of the rule |
251 </dd><dt><i>subscription</i> (AdBlockSubscription)</dt> |
326 </dd> |
|
327 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
252 <dd> |
328 <dd> |
253 reference to the subscription object |
329 reference to the subscription object |
254 </dd> |
330 </dd> |
255 </dl><a NAME="AdBlockRule.__convertPatternToRegExp" ID="AdBlockRule.__convertPatternToRegExp"></a> |
331 </dl> |
|
332 <a NAME="AdBlockRule.__convertPatternToRegExp" ID="AdBlockRule.__convertPatternToRegExp"></a> |
256 <h4>AdBlockRule.__convertPatternToRegExp</h4> |
333 <h4>AdBlockRule.__convertPatternToRegExp</h4> |
257 <b>__convertPatternToRegExp</b>(<i>wildcardPattern</i>) |
334 <b>__convertPatternToRegExp</b>(<i>wildcardPattern</i>) |
|
335 |
258 <p> |
336 <p> |
259 Private method to convert a wildcard pattern to a regular expression. |
337 Private method to convert a wildcard pattern to a regular expression. |
260 </p><dl> |
338 </p> |
|
339 <dl> |
|
340 |
261 <dt><i>wildcardPattern</i> (str)</dt> |
341 <dt><i>wildcardPattern</i> (str)</dt> |
262 <dd> |
342 <dd> |
263 string containing the wildcard pattern |
343 string containing the wildcard pattern |
264 </dd> |
344 </dd> |
265 </dl><dl> |
345 </dl> |
|
346 <dl> |
266 <dt>Returns:</dt> |
347 <dt>Returns:</dt> |
267 <dd> |
348 <dd> |
268 string containing a regular expression |
349 string containing a regular expression |
269 </dd> |
350 </dd> |
270 </dl><dl> |
351 </dl> |
|
352 <dl> |
271 <dt>Return Type:</dt> |
353 <dt>Return Type:</dt> |
272 <dd> |
354 <dd> |
273 string |
355 string |
274 </dd> |
356 </dd> |
275 </dl><a NAME="AdBlockRule.__filterIsOnlyDomain" ID="AdBlockRule.__filterIsOnlyDomain"></a> |
357 </dl> |
|
358 <a NAME="AdBlockRule.__filterIsOnlyDomain" ID="AdBlockRule.__filterIsOnlyDomain"></a> |
276 <h4>AdBlockRule.__filterIsOnlyDomain</h4> |
359 <h4>AdBlockRule.__filterIsOnlyDomain</h4> |
277 <b>__filterIsOnlyDomain</b>(<i>filterString</i>) |
360 <b>__filterIsOnlyDomain</b>(<i>filterString</i>) |
|
361 |
278 <p> |
362 <p> |
279 Private method to check, if the given filter is a domain only filter. |
363 Private method to check, if the given filter is a domain only filter. |
280 </p><dl> |
364 </p> |
|
365 <dl> |
|
366 |
281 <dt><i>filterString</i> (str)</dt> |
367 <dt><i>filterString</i> (str)</dt> |
282 <dd> |
368 <dd> |
283 filter string to be checked |
369 filter string to be checked |
284 </dd> |
370 </dd> |
285 </dl><dl> |
371 </dl> |
|
372 <dl> |
286 <dt>Returns:</dt> |
373 <dt>Returns:</dt> |
287 <dd> |
374 <dd> |
288 flag indicating a domain only filter |
375 flag indicating a domain only filter |
289 </dd> |
376 </dd> |
290 </dl><dl> |
377 </dl> |
291 <dt>Return Type:</dt> |
378 <dl> |
292 <dd> |
379 <dt>Return Type:</dt> |
293 bool |
380 <dd> |
294 </dd> |
381 bool |
295 </dl><a NAME="AdBlockRule.__filterIsOnlyEndsMatch" ID="AdBlockRule.__filterIsOnlyEndsMatch"></a> |
382 </dd> |
|
383 </dl> |
|
384 <a NAME="AdBlockRule.__filterIsOnlyEndsMatch" ID="AdBlockRule.__filterIsOnlyEndsMatch"></a> |
296 <h4>AdBlockRule.__filterIsOnlyEndsMatch</h4> |
385 <h4>AdBlockRule.__filterIsOnlyEndsMatch</h4> |
297 <b>__filterIsOnlyEndsMatch</b>(<i>filterString</i>) |
386 <b>__filterIsOnlyEndsMatch</b>(<i>filterString</i>) |
|
387 |
298 <p> |
388 <p> |
299 Private method to check, if the given filter is to match against the |
389 Private method to check, if the given filter is to match against the |
300 end of a string. |
390 end of a string. |
301 </p><dl> |
391 </p> |
|
392 <dl> |
|
393 |
302 <dt><i>filterString</i> (str)</dt> |
394 <dt><i>filterString</i> (str)</dt> |
303 <dd> |
395 <dd> |
304 filter string to be checked |
396 filter string to be checked |
305 </dd> |
397 </dd> |
306 </dl><dl> |
398 </dl> |
|
399 <dl> |
307 <dt>Returns:</dt> |
400 <dt>Returns:</dt> |
308 <dd> |
401 <dd> |
309 flag indicating a end of string match filter |
402 flag indicating a end of string match filter |
310 </dd> |
403 </dd> |
311 </dl><dl> |
404 </dl> |
312 <dt>Return Type:</dt> |
405 <dl> |
313 <dd> |
406 <dt>Return Type:</dt> |
314 bool |
407 <dd> |
315 </dd> |
408 bool |
316 </dl><a NAME="AdBlockRule.__hasException" ID="AdBlockRule.__hasException"></a> |
409 </dd> |
|
410 </dl> |
|
411 <a NAME="AdBlockRule.__hasException" ID="AdBlockRule.__hasException"></a> |
317 <h4>AdBlockRule.__hasException</h4> |
412 <h4>AdBlockRule.__hasException</h4> |
318 <b>__hasException</b>(<i>opt</i>) |
413 <b>__hasException</b>(<i>opt</i>) |
|
414 |
319 <p> |
415 <p> |
320 Private method to check, if the given option has been set as an |
416 Private method to check, if the given option has been set as an |
321 exception. |
417 exception. |
322 </p><dl> |
418 </p> |
|
419 <dl> |
|
420 |
323 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
421 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
324 <dd> |
422 <dd> |
325 option to check for |
423 option to check for |
326 </dd> |
424 </dd> |
327 </dl><dl> |
425 </dl> |
|
426 <dl> |
328 <dt>Returns:</dt> |
427 <dt>Returns:</dt> |
329 <dd> |
428 <dd> |
330 flag indicating the exception state of the option |
429 flag indicating the exception state of the option |
331 </dd> |
430 </dd> |
332 </dl><dl> |
431 </dl> |
333 <dt>Return Type:</dt> |
432 <dl> |
334 <dd> |
433 <dt>Return Type:</dt> |
335 bool |
434 <dd> |
336 </dd> |
435 bool |
337 </dl><a NAME="AdBlockRule.__hasOption" ID="AdBlockRule.__hasOption"></a> |
436 </dd> |
|
437 </dl> |
|
438 <a NAME="AdBlockRule.__hasOption" ID="AdBlockRule.__hasOption"></a> |
338 <h4>AdBlockRule.__hasOption</h4> |
439 <h4>AdBlockRule.__hasOption</h4> |
339 <b>__hasOption</b>(<i>opt</i>) |
440 <b>__hasOption</b>(<i>opt</i>) |
|
441 |
340 <p> |
442 <p> |
341 Private method to check, if the given option has been set. |
443 Private method to check, if the given option has been set. |
342 </p><dl> |
444 </p> |
|
445 <dl> |
|
446 |
343 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
447 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
344 <dd> |
448 <dd> |
345 option to check for |
449 option to check for |
346 </dd> |
450 </dd> |
347 </dl><dl> |
451 </dl> |
|
452 <dl> |
348 <dt>Returns:</dt> |
453 <dt>Returns:</dt> |
349 <dd> |
454 <dd> |
350 flag indicating the state of the option |
455 flag indicating the state of the option |
351 </dd> |
456 </dd> |
352 </dl><dl> |
457 </dl> |
353 <dt>Return Type:</dt> |
458 <dl> |
354 <dd> |
459 <dt>Return Type:</dt> |
355 bool |
460 <dd> |
356 </dd> |
461 bool |
357 </dl><a NAME="AdBlockRule.__isMatchingDomain" ID="AdBlockRule.__isMatchingDomain"></a> |
462 </dd> |
|
463 </dl> |
|
464 <a NAME="AdBlockRule.__isMatchingDomain" ID="AdBlockRule.__isMatchingDomain"></a> |
358 <h4>AdBlockRule.__isMatchingDomain</h4> |
465 <h4>AdBlockRule.__isMatchingDomain</h4> |
359 <b>__isMatchingDomain</b>(<i>domain, filterString</i>) |
466 <b>__isMatchingDomain</b>(<i>domain, filterString</i>) |
|
467 |
360 <p> |
468 <p> |
361 Private method to check, if a given domain matches the given filter |
469 Private method to check, if a given domain matches the given filter |
362 string. |
470 string. |
363 </p><dl> |
471 </p> |
|
472 <dl> |
|
473 |
364 <dt><i>domain</i> (str)</dt> |
474 <dt><i>domain</i> (str)</dt> |
365 <dd> |
475 <dd> |
366 domain to be checked |
476 domain to be checked |
367 </dd><dt><i>filterString</i> (str)</dt> |
477 </dd> |
|
478 <dt><i>filterString</i> (str)</dt> |
368 <dd> |
479 <dd> |
369 filter string to check against |
480 filter string to check against |
370 </dd> |
481 </dd> |
371 </dl><dl> |
482 </dl> |
372 <dt>Returns:</dt> |
483 <dl> |
373 <dd> |
484 <dt>Returns:</dt> |
374 flag indicating a match |
485 <dd> |
375 </dd> |
486 flag indicating a match |
376 </dl><dl> |
487 </dd> |
377 <dt>Return Type:</dt> |
488 </dl> |
378 <dd> |
489 <dl> |
379 bool |
490 <dt>Return Type:</dt> |
380 </dd> |
491 <dd> |
381 </dl><a NAME="AdBlockRule.__isMatchingRegExpStrings" ID="AdBlockRule.__isMatchingRegExpStrings"></a> |
492 bool |
|
493 </dd> |
|
494 </dl> |
|
495 <a NAME="AdBlockRule.__isMatchingRegExpStrings" ID="AdBlockRule.__isMatchingRegExpStrings"></a> |
382 <h4>AdBlockRule.__isMatchingRegExpStrings</h4> |
496 <h4>AdBlockRule.__isMatchingRegExpStrings</h4> |
383 <b>__isMatchingRegExpStrings</b>(<i>url</i>) |
497 <b>__isMatchingRegExpStrings</b>(<i>url</i>) |
|
498 |
384 <p> |
499 <p> |
385 Private method to check the given URL against the fixed parts of |
500 Private method to check the given URL against the fixed parts of |
386 the regexp. |
501 the regexp. |
387 </p><dl> |
502 </p> |
|
503 <dl> |
|
504 |
388 <dt><i>url</i> (str)</dt> |
505 <dt><i>url</i> (str)</dt> |
389 <dd> |
506 <dd> |
390 URL to be checked |
507 URL to be checked |
391 </dd> |
508 </dd> |
392 </dl><dl> |
509 </dl> |
393 <dt>Returns:</dt> |
510 <dl> |
394 <dd> |
511 <dt>Returns:</dt> |
395 flag indicating a match |
512 <dd> |
396 </dd> |
513 flag indicating a match |
397 </dl><dl> |
514 </dd> |
398 <dt>Return Type:</dt> |
515 </dl> |
399 <dd> |
516 <dl> |
400 bool |
517 <dt>Return Type:</dt> |
401 </dd> |
518 <dd> |
402 </dl><a NAME="AdBlockRule.__parseDomains" ID="AdBlockRule.__parseDomains"></a> |
519 bool |
|
520 </dd> |
|
521 </dl> |
|
522 <a NAME="AdBlockRule.__parseDomains" ID="AdBlockRule.__parseDomains"></a> |
403 <h4>AdBlockRule.__parseDomains</h4> |
523 <h4>AdBlockRule.__parseDomains</h4> |
404 <b>__parseDomains</b>(<i>domains, separator</i>) |
524 <b>__parseDomains</b>(<i>domains, separator</i>) |
|
525 |
405 <p> |
526 <p> |
406 Private method to parse a string with a domain list. |
527 Private method to parse a string with a domain list. |
407 </p><dl> |
528 </p> |
|
529 <dl> |
|
530 |
408 <dt><i>domains</i> (str)</dt> |
531 <dt><i>domains</i> (str)</dt> |
409 <dd> |
532 <dd> |
410 list of domains |
533 list of domains |
411 </dd><dt><i>separator</i> (str)</dt> |
534 </dd> |
|
535 <dt><i>separator</i> (str)</dt> |
412 <dd> |
536 <dd> |
413 separator character used by the list |
537 separator character used by the list |
414 </dd> |
538 </dd> |
415 </dl><a NAME="AdBlockRule.__parseFilter" ID="AdBlockRule.__parseFilter"></a> |
539 </dl> |
|
540 <a NAME="AdBlockRule.__parseFilter" ID="AdBlockRule.__parseFilter"></a> |
416 <h4>AdBlockRule.__parseFilter</h4> |
541 <h4>AdBlockRule.__parseFilter</h4> |
417 <b>__parseFilter</b>(<i></i>) |
542 <b>__parseFilter</b>(<i></i>) |
|
543 |
418 <p> |
544 <p> |
419 Private method to parse the filter pattern. |
545 Private method to parse the filter pattern. |
420 </p><a NAME="AdBlockRule.__parseRegExpFilter" ID="AdBlockRule.__parseRegExpFilter"></a> |
546 </p> |
|
547 <a NAME="AdBlockRule.__parseRegExpFilter" ID="AdBlockRule.__parseRegExpFilter"></a> |
421 <h4>AdBlockRule.__parseRegExpFilter</h4> |
548 <h4>AdBlockRule.__parseRegExpFilter</h4> |
422 <b>__parseRegExpFilter</b>(<i>filterString</i>) |
549 <b>__parseRegExpFilter</b>(<i>filterString</i>) |
|
550 |
423 <p> |
551 <p> |
424 Private method to split the given regular expression into strings that |
552 Private method to split the given regular expression into strings that |
425 can be used with 'in'. |
553 can be used with 'in'. |
426 </p><dl> |
554 </p> |
|
555 <dl> |
|
556 |
427 <dt><i>filterString</i> (str)</dt> |
557 <dt><i>filterString</i> (str)</dt> |
428 <dd> |
558 <dd> |
429 regexp filter string to be parsed |
559 regexp filter string to be parsed |
430 </dd> |
560 </dd> |
431 </dl><dl> |
561 </dl> |
|
562 <dl> |
432 <dt>Returns:</dt> |
563 <dt>Returns:</dt> |
433 <dd> |
564 <dd> |
434 fixed string parts of the filter |
565 fixed string parts of the filter |
435 </dd> |
566 </dd> |
436 </dl><dl> |
567 </dl> |
|
568 <dl> |
437 <dt>Return Type:</dt> |
569 <dt>Return Type:</dt> |
438 <dd> |
570 <dd> |
439 list of str |
571 list of str |
440 </dd> |
572 </dd> |
441 </dl><a NAME="AdBlockRule.__setException" ID="AdBlockRule.__setException"></a> |
573 </dl> |
|
574 <a NAME="AdBlockRule.__setException" ID="AdBlockRule.__setException"></a> |
442 <h4>AdBlockRule.__setException</h4> |
575 <h4>AdBlockRule.__setException</h4> |
443 <b>__setException</b>(<i>opt, on</i>) |
576 <b>__setException</b>(<i>opt, on</i>) |
|
577 |
444 <p> |
578 <p> |
445 Private method to set the given option as an exception. |
579 Private method to set the given option as an exception. |
446 </p><dl> |
580 </p> |
|
581 <dl> |
|
582 |
447 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
583 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
448 <dd> |
584 <dd> |
449 option to be set |
585 option to be set |
450 </dd><dt><i>on</i> (bool)</dt> |
586 </dd> |
|
587 <dt><i>on</i> (bool)</dt> |
451 <dd> |
588 <dd> |
452 flag indicating to set or unset the exception |
589 flag indicating to set or unset the exception |
453 </dd> |
590 </dd> |
454 </dl><a NAME="AdBlockRule.__stringMatch" ID="AdBlockRule.__stringMatch"></a> |
591 </dl> |
|
592 <a NAME="AdBlockRule.__stringMatch" ID="AdBlockRule.__stringMatch"></a> |
455 <h4>AdBlockRule.__stringMatch</h4> |
593 <h4>AdBlockRule.__stringMatch</h4> |
456 <b>__stringMatch</b>(<i>domain, encodedUrl</i>) |
594 <b>__stringMatch</b>(<i>domain, encodedUrl</i>) |
|
595 |
457 <p> |
596 <p> |
458 Private method to match a domain string. |
597 Private method to match a domain string. |
459 </p><dl> |
598 </p> |
|
599 <dl> |
|
600 |
460 <dt><i>domain</i> (str)</dt> |
601 <dt><i>domain</i> (str)</dt> |
461 <dd> |
602 <dd> |
462 domain to match |
603 domain to match |
463 </dd><dt><i>encodedUrl</i> (str)</dt> |
604 </dd> |
|
605 <dt><i>encodedUrl</i> (str)</dt> |
464 <dd> |
606 <dd> |
465 URL in encoded form |
607 URL in encoded form |
466 </dd> |
608 </dd> |
467 </dl><dl> |
609 </dl> |
468 <dt>Returns:</dt> |
610 <dl> |
469 <dd> |
611 <dt>Returns:</dt> |
470 flag indicating a match |
612 <dd> |
471 </dd> |
613 flag indicating a match |
472 </dl><dl> |
614 </dd> |
473 <dt>Return Type:</dt> |
615 </dl> |
474 <dd> |
616 <dl> |
475 bool |
617 <dt>Return Type:</dt> |
476 </dd> |
618 <dd> |
477 </dl><a NAME="AdBlockRule.addBlockedDomains" ID="AdBlockRule.addBlockedDomains"></a> |
619 bool |
|
620 </dd> |
|
621 </dl> |
|
622 <a NAME="AdBlockRule.addBlockedDomains" ID="AdBlockRule.addBlockedDomains"></a> |
478 <h4>AdBlockRule.addBlockedDomains</h4> |
623 <h4>AdBlockRule.addBlockedDomains</h4> |
479 <b>addBlockedDomains</b>(<i>domains</i>) |
624 <b>addBlockedDomains</b>(<i>domains</i>) |
|
625 |
480 <p> |
626 <p> |
481 Public method to add to the list of blocked domains. |
627 Public method to add to the list of blocked domains. |
482 </p><dl> |
628 </p> |
|
629 <dl> |
|
630 |
483 <dt><i>domains</i> (str or list of str)</dt> |
631 <dt><i>domains</i> (str or list of str)</dt> |
484 <dd> |
632 <dd> |
485 list of domains to be added |
633 list of domains to be added |
486 </dd> |
634 </dd> |
487 </dl><a NAME="AdBlockRule.allowedDomains" ID="AdBlockRule.allowedDomains"></a> |
635 </dl> |
|
636 <a NAME="AdBlockRule.allowedDomains" ID="AdBlockRule.allowedDomains"></a> |
488 <h4>AdBlockRule.allowedDomains</h4> |
637 <h4>AdBlockRule.allowedDomains</h4> |
489 <b>allowedDomains</b>(<i></i>) |
638 <b>allowedDomains</b>(<i></i>) |
|
639 |
490 <p> |
640 <p> |
491 Public method to get a copy of the list of allowed domains. |
641 Public method to get a copy of the list of allowed domains. |
492 </p><dl> |
642 </p> |
|
643 <dl> |
493 <dt>Returns:</dt> |
644 <dt>Returns:</dt> |
494 <dd> |
645 <dd> |
495 list of allowed domains |
646 list of allowed domains |
496 </dd> |
647 </dd> |
497 </dl><dl> |
648 </dl> |
|
649 <dl> |
498 <dt>Return Type:</dt> |
650 <dt>Return Type:</dt> |
499 <dd> |
651 <dd> |
500 list of str |
652 list of str |
501 </dd> |
653 </dd> |
502 </dl><a NAME="AdBlockRule.blockedDomains" ID="AdBlockRule.blockedDomains"></a> |
654 </dl> |
|
655 <a NAME="AdBlockRule.blockedDomains" ID="AdBlockRule.blockedDomains"></a> |
503 <h4>AdBlockRule.blockedDomains</h4> |
656 <h4>AdBlockRule.blockedDomains</h4> |
504 <b>blockedDomains</b>(<i></i>) |
657 <b>blockedDomains</b>(<i></i>) |
|
658 |
505 <p> |
659 <p> |
506 Public method to get a copy of the list of blocked domains. |
660 Public method to get a copy of the list of blocked domains. |
507 </p><dl> |
661 </p> |
|
662 <dl> |
508 <dt>Returns:</dt> |
663 <dt>Returns:</dt> |
509 <dd> |
664 <dd> |
510 list of blocked domains |
665 list of blocked domains |
511 </dd> |
666 </dd> |
512 </dl><dl> |
667 </dl> |
|
668 <dl> |
513 <dt>Return Type:</dt> |
669 <dt>Return Type:</dt> |
514 <dd> |
670 <dd> |
515 list of str |
671 list of str |
516 </dd> |
672 </dd> |
517 </dl><a NAME="AdBlockRule.caseSensitivity" ID="AdBlockRule.caseSensitivity"></a> |
673 </dl> |
|
674 <a NAME="AdBlockRule.caseSensitivity" ID="AdBlockRule.caseSensitivity"></a> |
518 <h4>AdBlockRule.caseSensitivity</h4> |
675 <h4>AdBlockRule.caseSensitivity</h4> |
519 <b>caseSensitivity</b>(<i></i>) |
676 <b>caseSensitivity</b>(<i></i>) |
|
677 |
520 <p> |
678 <p> |
521 Public method to get the case sensitivity. |
679 Public method to get the case sensitivity. |
522 </p><dl> |
680 </p> |
|
681 <dl> |
523 <dt>Returns:</dt> |
682 <dt>Returns:</dt> |
524 <dd> |
683 <dd> |
525 case sensitivity |
684 case sensitivity |
526 </dd> |
685 </dd> |
527 </dl><dl> |
686 </dl> |
|
687 <dl> |
528 <dt>Return Type:</dt> |
688 <dt>Return Type:</dt> |
529 <dd> |
689 <dd> |
530 Qt.CaseSensitivity |
690 Qt.CaseSensitivity |
531 </dd> |
691 </dd> |
532 </dl><a NAME="AdBlockRule.copyFrom" ID="AdBlockRule.copyFrom"></a> |
692 </dl> |
|
693 <a NAME="AdBlockRule.copyFrom" ID="AdBlockRule.copyFrom"></a> |
533 <h4>AdBlockRule.copyFrom</h4> |
694 <h4>AdBlockRule.copyFrom</h4> |
534 <b>copyFrom</b>(<i>other</i>) |
695 <b>copyFrom</b>(<i>other</i>) |
|
696 |
535 <p> |
697 <p> |
536 Public method to copy another AdBlock rule. |
698 Public method to copy another AdBlock rule. |
537 </p><dl> |
699 </p> |
|
700 <dl> |
|
701 |
538 <dt><i>other</i> (AdBlockRule)</dt> |
702 <dt><i>other</i> (AdBlockRule)</dt> |
539 <dd> |
703 <dd> |
540 reference to the AdBlock rule to copy from |
704 reference to the AdBlock rule to copy from |
541 </dd> |
705 </dd> |
542 </dl><a NAME="AdBlockRule.cssSelector" ID="AdBlockRule.cssSelector"></a> |
706 </dl> |
|
707 <a NAME="AdBlockRule.cssSelector" ID="AdBlockRule.cssSelector"></a> |
543 <h4>AdBlockRule.cssSelector</h4> |
708 <h4>AdBlockRule.cssSelector</h4> |
544 <b>cssSelector</b>(<i></i>) |
709 <b>cssSelector</b>(<i></i>) |
|
710 |
545 <p> |
711 <p> |
546 Public method to get the CSS selector of the rule. |
712 Public method to get the CSS selector of the rule. |
547 </p><dl> |
713 </p> |
|
714 <dl> |
548 <dt>Returns:</dt> |
715 <dt>Returns:</dt> |
549 <dd> |
716 <dd> |
550 CSS selector |
717 CSS selector |
551 </dd> |
718 </dd> |
552 </dl><dl> |
719 </dl> |
|
720 <dl> |
553 <dt>Return Type:</dt> |
721 <dt>Return Type:</dt> |
554 <dd> |
722 <dd> |
555 str |
723 str |
556 </dd> |
724 </dd> |
557 </dl><a NAME="AdBlockRule.filter" ID="AdBlockRule.filter"></a> |
725 </dl> |
|
726 <a NAME="AdBlockRule.filter" ID="AdBlockRule.filter"></a> |
558 <h4>AdBlockRule.filter</h4> |
727 <h4>AdBlockRule.filter</h4> |
559 <b>filter</b>(<i></i>) |
728 <b>filter</b>(<i></i>) |
|
729 |
560 <p> |
730 <p> |
561 Public method to get the rule filter string. |
731 Public method to get the rule filter string. |
562 </p><dl> |
732 </p> |
|
733 <dl> |
563 <dt>Returns:</dt> |
734 <dt>Returns:</dt> |
564 <dd> |
735 <dd> |
565 rule filter string |
736 rule filter string |
566 </dd> |
737 </dd> |
567 </dl><dl> |
738 </dl> |
|
739 <dl> |
568 <dt>Return Type:</dt> |
740 <dt>Return Type:</dt> |
569 <dd> |
741 <dd> |
570 str |
742 str |
571 </dd> |
743 </dd> |
572 </dl><a NAME="AdBlockRule.getRegExpAndMatchers" ID="AdBlockRule.getRegExpAndMatchers"></a> |
744 </dl> |
|
745 <a NAME="AdBlockRule.getRegExpAndMatchers" ID="AdBlockRule.getRegExpAndMatchers"></a> |
573 <h4>AdBlockRule.getRegExpAndMatchers</h4> |
746 <h4>AdBlockRule.getRegExpAndMatchers</h4> |
574 <b>getRegExpAndMatchers</b>(<i></i>) |
747 <b>getRegExpAndMatchers</b>(<i></i>) |
|
748 |
575 <p> |
749 <p> |
576 Public method to get the regular expression and associated string |
750 Public method to get the regular expression and associated string |
577 matchers. |
751 matchers. |
578 </p><dl> |
752 </p> |
|
753 <dl> |
579 <dt>Returns:</dt> |
754 <dt>Returns:</dt> |
580 <dd> |
755 <dd> |
581 tuple containing the regular expression and the list of |
756 tuple containing the regular expression and the list of |
582 string matchers |
757 string matchers |
583 </dd> |
758 </dd> |
584 </dl><dl> |
759 </dl> |
|
760 <dl> |
585 <dt>Return Type:</dt> |
761 <dt>Return Type:</dt> |
586 <dd> |
762 <dd> |
587 tuple of (QRegExp, list of str) |
763 tuple of (QRegExp, list of str) |
588 </dd> |
764 </dd> |
589 </dl><a NAME="AdBlockRule.isCSSRule" ID="AdBlockRule.isCSSRule"></a> |
765 </dl> |
|
766 <a NAME="AdBlockRule.isCSSRule" ID="AdBlockRule.isCSSRule"></a> |
590 <h4>AdBlockRule.isCSSRule</h4> |
767 <h4>AdBlockRule.isCSSRule</h4> |
591 <b>isCSSRule</b>(<i></i>) |
768 <b>isCSSRule</b>(<i></i>) |
|
769 |
592 <p> |
770 <p> |
593 Public method to check, if the rule is a CSS rule. |
771 Public method to check, if the rule is a CSS rule. |
594 </p><dl> |
772 </p> |
|
773 <dl> |
595 <dt>Returns:</dt> |
774 <dt>Returns:</dt> |
596 <dd> |
775 <dd> |
597 flag indicating a CSS rule |
776 flag indicating a CSS rule |
598 </dd> |
777 </dd> |
599 </dl><dl> |
778 </dl> |
600 <dt>Return Type:</dt> |
779 <dl> |
601 <dd> |
780 <dt>Return Type:</dt> |
602 bool |
781 <dd> |
603 </dd> |
782 bool |
604 </dl><a NAME="AdBlockRule.isComment" ID="AdBlockRule.isComment"></a> |
783 </dd> |
|
784 </dl> |
|
785 <a NAME="AdBlockRule.isComment" ID="AdBlockRule.isComment"></a> |
605 <h4>AdBlockRule.isComment</h4> |
786 <h4>AdBlockRule.isComment</h4> |
606 <b>isComment</b>(<i></i>) |
787 <b>isComment</b>(<i></i>) |
|
788 |
607 <p> |
789 <p> |
608 Public method to check, if this is a comment. |
790 Public method to check, if this is a comment. |
609 </p><dl> |
791 </p> |
|
792 <dl> |
610 <dt>Returns:</dt> |
793 <dt>Returns:</dt> |
611 <dd> |
794 <dd> |
612 flag indicating a comment |
795 flag indicating a comment |
613 </dd> |
796 </dd> |
614 </dl><dl> |
797 </dl> |
615 <dt>Return Type:</dt> |
798 <dl> |
616 <dd> |
799 <dt>Return Type:</dt> |
617 bool |
800 <dd> |
618 </dd> |
801 bool |
619 </dl><a NAME="AdBlockRule.isDocument" ID="AdBlockRule.isDocument"></a> |
802 </dd> |
|
803 </dl> |
|
804 <a NAME="AdBlockRule.isDocument" ID="AdBlockRule.isDocument"></a> |
620 <h4>AdBlockRule.isDocument</h4> |
805 <h4>AdBlockRule.isDocument</h4> |
621 <b>isDocument</b>(<i></i>) |
806 <b>isDocument</b>(<i></i>) |
|
807 |
622 <p> |
808 <p> |
623 Public method to check, if this is a document rule. |
809 Public method to check, if this is a document rule. |
624 </p><dl> |
810 </p> |
|
811 <dl> |
625 <dt>Returns:</dt> |
812 <dt>Returns:</dt> |
626 <dd> |
813 <dd> |
627 flag indicating a document rule |
814 flag indicating a document rule |
628 </dd> |
815 </dd> |
629 </dl><dl> |
816 </dl> |
630 <dt>Return Type:</dt> |
817 <dl> |
631 <dd> |
818 <dt>Return Type:</dt> |
632 bool |
819 <dd> |
633 </dd> |
820 bool |
634 </dl><a NAME="AdBlockRule.isDomainRestricted" ID="AdBlockRule.isDomainRestricted"></a> |
821 </dd> |
|
822 </dl> |
|
823 <a NAME="AdBlockRule.isDomainRestricted" ID="AdBlockRule.isDomainRestricted"></a> |
635 <h4>AdBlockRule.isDomainRestricted</h4> |
824 <h4>AdBlockRule.isDomainRestricted</h4> |
636 <b>isDomainRestricted</b>(<i></i>) |
825 <b>isDomainRestricted</b>(<i></i>) |
|
826 |
637 <p> |
827 <p> |
638 Public method to check, if this rule is restricted by domain. |
828 Public method to check, if this rule is restricted by domain. |
639 </p><dl> |
829 </p> |
|
830 <dl> |
640 <dt>Returns:</dt> |
831 <dt>Returns:</dt> |
641 <dd> |
832 <dd> |
642 flag indicating a domain restriction |
833 flag indicating a domain restriction |
643 </dd> |
834 </dd> |
644 </dl><dl> |
835 </dl> |
645 <dt>Return Type:</dt> |
836 <dl> |
646 <dd> |
837 <dt>Return Type:</dt> |
647 bool |
838 <dd> |
648 </dd> |
839 bool |
649 </dl><a NAME="AdBlockRule.isElementHiding" ID="AdBlockRule.isElementHiding"></a> |
840 </dd> |
|
841 </dl> |
|
842 <a NAME="AdBlockRule.isElementHiding" ID="AdBlockRule.isElementHiding"></a> |
650 <h4>AdBlockRule.isElementHiding</h4> |
843 <h4>AdBlockRule.isElementHiding</h4> |
651 <b>isElementHiding</b>(<i></i>) |
844 <b>isElementHiding</b>(<i></i>) |
|
845 |
652 <p> |
846 <p> |
653 Public method to check, if this is an element hiding rule. |
847 Public method to check, if this is an element hiding rule. |
654 </p><dl> |
848 </p> |
|
849 <dl> |
655 <dt>Returns:</dt> |
850 <dt>Returns:</dt> |
656 <dd> |
851 <dd> |
657 flag indicating an element hiding rule |
852 flag indicating an element hiding rule |
658 </dd> |
853 </dd> |
659 </dl><dl> |
854 </dl> |
660 <dt>Return Type:</dt> |
855 <dl> |
661 <dd> |
856 <dt>Return Type:</dt> |
662 bool |
857 <dd> |
663 </dd> |
858 bool |
664 </dl><a NAME="AdBlockRule.isEnabled" ID="AdBlockRule.isEnabled"></a> |
859 </dd> |
|
860 </dl> |
|
861 <a NAME="AdBlockRule.isEnabled" ID="AdBlockRule.isEnabled"></a> |
665 <h4>AdBlockRule.isEnabled</h4> |
862 <h4>AdBlockRule.isEnabled</h4> |
666 <b>isEnabled</b>(<i></i>) |
863 <b>isEnabled</b>(<i></i>) |
|
864 |
667 <p> |
865 <p> |
668 Public method to check, if the rule is enabled. |
866 Public method to check, if the rule is enabled. |
669 </p><dl> |
867 </p> |
|
868 <dl> |
670 <dt>Returns:</dt> |
869 <dt>Returns:</dt> |
671 <dd> |
870 <dd> |
672 flag indicating enabled state |
871 flag indicating enabled state |
673 </dd> |
872 </dd> |
674 </dl><dl> |
873 </dl> |
675 <dt>Return Type:</dt> |
874 <dl> |
676 <dd> |
875 <dt>Return Type:</dt> |
677 bool |
876 <dd> |
678 </dd> |
877 bool |
679 </dl><a NAME="AdBlockRule.isException" ID="AdBlockRule.isException"></a> |
878 </dd> |
|
879 </dl> |
|
880 <a NAME="AdBlockRule.isException" ID="AdBlockRule.isException"></a> |
680 <h4>AdBlockRule.isException</h4> |
881 <h4>AdBlockRule.isException</h4> |
681 <b>isException</b>(<i></i>) |
882 <b>isException</b>(<i></i>) |
|
883 |
682 <p> |
884 <p> |
683 Public method to check, if the rule defines an exception. |
885 Public method to check, if the rule defines an exception. |
684 </p><dl> |
886 </p> |
|
887 <dl> |
685 <dt>Returns:</dt> |
888 <dt>Returns:</dt> |
686 <dd> |
889 <dd> |
687 flag indicating an exception |
890 flag indicating an exception |
688 </dd> |
891 </dd> |
689 </dl><dl> |
892 </dl> |
690 <dt>Return Type:</dt> |
893 <dl> |
691 <dd> |
894 <dt>Return Type:</dt> |
692 bool |
895 <dd> |
693 </dd> |
896 bool |
694 </dl><a NAME="AdBlockRule.isHeader" ID="AdBlockRule.isHeader"></a> |
897 </dd> |
|
898 </dl> |
|
899 <a NAME="AdBlockRule.isHeader" ID="AdBlockRule.isHeader"></a> |
695 <h4>AdBlockRule.isHeader</h4> |
900 <h4>AdBlockRule.isHeader</h4> |
696 <b>isHeader</b>(<i></i>) |
901 <b>isHeader</b>(<i></i>) |
|
902 |
697 <p> |
903 <p> |
698 Public method to check, if this is a header. |
904 Public method to check, if this is a header. |
699 </p><dl> |
905 </p> |
|
906 <dl> |
700 <dt>Returns:</dt> |
907 <dt>Returns:</dt> |
701 <dd> |
908 <dd> |
702 flag indicating a header |
909 flag indicating a header |
703 </dd> |
910 </dd> |
704 </dl><dl> |
911 </dl> |
705 <dt>Return Type:</dt> |
912 <dl> |
706 <dd> |
913 <dt>Return Type:</dt> |
707 bool |
914 <dd> |
708 </dd> |
915 bool |
709 </dl><a NAME="AdBlockRule.isInternalDisabled" ID="AdBlockRule.isInternalDisabled"></a> |
916 </dd> |
|
917 </dl> |
|
918 <a NAME="AdBlockRule.isInternalDisabled" ID="AdBlockRule.isInternalDisabled"></a> |
710 <h4>AdBlockRule.isInternalDisabled</h4> |
919 <h4>AdBlockRule.isInternalDisabled</h4> |
711 <b>isInternalDisabled</b>(<i></i>) |
920 <b>isInternalDisabled</b>(<i></i>) |
|
921 |
712 <p> |
922 <p> |
713 Public method to check, if this rule was disabled internally. |
923 Public method to check, if this rule was disabled internally. |
714 </p><dl> |
924 </p> |
|
925 <dl> |
715 <dt>Returns:</dt> |
926 <dt>Returns:</dt> |
716 <dd> |
927 <dd> |
717 flag indicating an internally disabled rule |
928 flag indicating an internally disabled rule |
718 </dd> |
929 </dd> |
719 </dl><dl> |
930 </dl> |
720 <dt>Return Type:</dt> |
931 <dl> |
721 <dd> |
932 <dt>Return Type:</dt> |
722 bool |
933 <dd> |
723 </dd> |
934 bool |
724 </dl><a NAME="AdBlockRule.isSlow" ID="AdBlockRule.isSlow"></a> |
935 </dd> |
|
936 </dl> |
|
937 <a NAME="AdBlockRule.isSlow" ID="AdBlockRule.isSlow"></a> |
725 <h4>AdBlockRule.isSlow</h4> |
938 <h4>AdBlockRule.isSlow</h4> |
726 <b>isSlow</b>(<i></i>) |
939 <b>isSlow</b>(<i></i>) |
|
940 |
727 <p> |
941 <p> |
728 Public method to check, if this is a slow rule. |
942 Public method to check, if this is a slow rule. |
729 </p><dl> |
943 </p> |
|
944 <dl> |
730 <dt>Returns:</dt> |
945 <dt>Returns:</dt> |
731 <dd> |
946 <dd> |
732 flag indicating a slow rule |
947 flag indicating a slow rule |
733 </dd> |
948 </dd> |
734 </dl><dl> |
949 </dl> |
735 <dt>Return Type:</dt> |
950 <dl> |
736 <dd> |
951 <dt>Return Type:</dt> |
737 bool |
952 <dd> |
738 </dd> |
953 bool |
739 </dl><a NAME="AdBlockRule.matchDomain" ID="AdBlockRule.matchDomain"></a> |
954 </dd> |
|
955 </dl> |
|
956 <a NAME="AdBlockRule.matchDomain" ID="AdBlockRule.matchDomain"></a> |
740 <h4>AdBlockRule.matchDomain</h4> |
957 <h4>AdBlockRule.matchDomain</h4> |
741 <b>matchDomain</b>(<i>domain</i>) |
958 <b>matchDomain</b>(<i>domain</i>) |
|
959 |
742 <p> |
960 <p> |
743 Public method to match a domain. |
961 Public method to match a domain. |
744 </p><dl> |
962 </p> |
|
963 <dl> |
|
964 |
745 <dt><i>domain</i> (str)</dt> |
965 <dt><i>domain</i> (str)</dt> |
746 <dd> |
966 <dd> |
747 domain name to check |
967 domain name to check |
748 </dd> |
968 </dd> |
749 </dl><dl> |
969 </dl> |
750 <dt>Returns:</dt> |
970 <dl> |
751 <dd> |
971 <dt>Returns:</dt> |
752 flag indicating a match |
972 <dd> |
753 </dd> |
973 flag indicating a match |
754 </dl><dl> |
974 </dd> |
755 <dt>Return Type:</dt> |
975 </dl> |
756 <dd> |
976 <dl> |
757 bool |
977 <dt>Return Type:</dt> |
758 </dd> |
978 <dd> |
759 </dl><a NAME="AdBlockRule.matchFont" ID="AdBlockRule.matchFont"></a> |
979 bool |
|
980 </dd> |
|
981 </dl> |
|
982 <a NAME="AdBlockRule.matchFont" ID="AdBlockRule.matchFont"></a> |
760 <h4>AdBlockRule.matchFont</h4> |
983 <h4>AdBlockRule.matchFont</h4> |
761 <b>matchFont</b>(<i>req</i>) |
984 <b>matchFont</b>(<i>req</i>) |
|
985 |
762 <p> |
986 <p> |
763 Public method to match a Font rule. |
987 Public method to match a Font rule. |
764 </p><dl> |
988 </p> |
|
989 <dl> |
|
990 |
765 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
991 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
766 <dd> |
992 <dd> |
767 request object to check |
993 request object to check |
768 </dd> |
994 </dd> |
769 </dl><dl> |
995 </dl> |
770 <dt>Returns:</dt> |
996 <dl> |
771 <dd> |
997 <dt>Returns:</dt> |
772 flag indicating a match |
998 <dd> |
773 </dd> |
999 flag indicating a match |
774 </dl><dl> |
1000 </dd> |
775 <dt>Return Type:</dt> |
1001 </dl> |
776 <dd> |
1002 <dl> |
777 bool |
1003 <dt>Return Type:</dt> |
778 </dd> |
1004 <dd> |
779 </dl><a NAME="AdBlockRule.matchImage" ID="AdBlockRule.matchImage"></a> |
1005 bool |
|
1006 </dd> |
|
1007 </dl> |
|
1008 <a NAME="AdBlockRule.matchImage" ID="AdBlockRule.matchImage"></a> |
780 <h4>AdBlockRule.matchImage</h4> |
1009 <h4>AdBlockRule.matchImage</h4> |
781 <b>matchImage</b>(<i>req</i>) |
1010 <b>matchImage</b>(<i>req</i>) |
|
1011 |
782 <p> |
1012 <p> |
783 Public method to match an Image rule. |
1013 Public method to match an Image rule. |
784 </p><dl> |
1014 </p> |
|
1015 <dl> |
|
1016 |
785 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1017 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
786 <dd> |
1018 <dd> |
787 request object to check |
1019 request object to check |
788 </dd> |
1020 </dd> |
789 </dl><dl> |
1021 </dl> |
790 <dt>Returns:</dt> |
1022 <dl> |
791 <dd> |
1023 <dt>Returns:</dt> |
792 flag indicating a match |
1024 <dd> |
793 </dd> |
1025 flag indicating a match |
794 </dl><dl> |
1026 </dd> |
795 <dt>Return Type:</dt> |
1027 </dl> |
796 <dd> |
1028 <dl> |
797 bool |
1029 <dt>Return Type:</dt> |
798 </dd> |
1030 <dd> |
799 </dl><a NAME="AdBlockRule.matchMedia" ID="AdBlockRule.matchMedia"></a> |
1031 bool |
|
1032 </dd> |
|
1033 </dl> |
|
1034 <a NAME="AdBlockRule.matchMedia" ID="AdBlockRule.matchMedia"></a> |
800 <h4>AdBlockRule.matchMedia</h4> |
1035 <h4>AdBlockRule.matchMedia</h4> |
801 <b>matchMedia</b>(<i>req</i>) |
1036 <b>matchMedia</b>(<i>req</i>) |
|
1037 |
802 <p> |
1038 <p> |
803 Public method to match a Media rule. |
1039 Public method to match a Media rule. |
804 </p><dl> |
1040 </p> |
|
1041 <dl> |
|
1042 |
805 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1043 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
806 <dd> |
1044 <dd> |
807 request object to check |
1045 request object to check |
808 </dd> |
1046 </dd> |
809 </dl><dl> |
1047 </dl> |
810 <dt>Returns:</dt> |
1048 <dl> |
811 <dd> |
1049 <dt>Returns:</dt> |
812 flag indicating a match |
1050 <dd> |
813 </dd> |
1051 flag indicating a match |
814 </dl><dl> |
1052 </dd> |
815 <dt>Return Type:</dt> |
1053 </dl> |
816 <dd> |
1054 <dl> |
817 bool |
1055 <dt>Return Type:</dt> |
818 </dd> |
1056 <dd> |
819 </dl><a NAME="AdBlockRule.matchObject" ID="AdBlockRule.matchObject"></a> |
1057 bool |
|
1058 </dd> |
|
1059 </dl> |
|
1060 <a NAME="AdBlockRule.matchObject" ID="AdBlockRule.matchObject"></a> |
820 <h4>AdBlockRule.matchObject</h4> |
1061 <h4>AdBlockRule.matchObject</h4> |
821 <b>matchObject</b>(<i>req</i>) |
1062 <b>matchObject</b>(<i>req</i>) |
|
1063 |
822 <p> |
1064 <p> |
823 Public method to match an object rule. |
1065 Public method to match an object rule. |
824 </p><dl> |
1066 </p> |
|
1067 <dl> |
|
1068 |
825 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1069 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
826 <dd> |
1070 <dd> |
827 request object to check |
1071 request object to check |
828 </dd> |
1072 </dd> |
829 </dl><dl> |
1073 </dl> |
830 <dt>Returns:</dt> |
1074 <dl> |
831 <dd> |
1075 <dt>Returns:</dt> |
832 flag indicating a match |
1076 <dd> |
833 </dd> |
1077 flag indicating a match |
834 </dl><dl> |
1078 </dd> |
835 <dt>Return Type:</dt> |
1079 </dl> |
836 <dd> |
1080 <dl> |
837 bool |
1081 <dt>Return Type:</dt> |
838 </dd> |
1082 <dd> |
839 </dl><a NAME="AdBlockRule.matchObjectSubrequest" ID="AdBlockRule.matchObjectSubrequest"></a> |
1083 bool |
|
1084 </dd> |
|
1085 </dl> |
|
1086 <a NAME="AdBlockRule.matchObjectSubrequest" ID="AdBlockRule.matchObjectSubrequest"></a> |
840 <h4>AdBlockRule.matchObjectSubrequest</h4> |
1087 <h4>AdBlockRule.matchObjectSubrequest</h4> |
841 <b>matchObjectSubrequest</b>(<i>req</i>) |
1088 <b>matchObjectSubrequest</b>(<i>req</i>) |
|
1089 |
842 <p> |
1090 <p> |
843 Public method to match an Object Subrequest rule. |
1091 Public method to match an Object Subrequest rule. |
844 </p><dl> |
1092 </p> |
|
1093 <dl> |
|
1094 |
845 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1095 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
846 <dd> |
1096 <dd> |
847 request object to check |
1097 request object to check |
848 </dd> |
1098 </dd> |
849 </dl><dl> |
1099 </dl> |
850 <dt>Returns:</dt> |
1100 <dl> |
851 <dd> |
1101 <dt>Returns:</dt> |
852 flag indicating a match |
1102 <dd> |
853 </dd> |
1103 flag indicating a match |
854 </dl><dl> |
1104 </dd> |
|
1105 </dl> |
|
1106 <dl> |
855 <dt>Return Type:</dt> |
1107 <dt>Return Type:</dt> |
856 <dd> |
1108 <dd> |
857 boolean |
1109 boolean |
858 </dd> |
1110 </dd> |
859 </dl><a NAME="AdBlockRule.matchOther" ID="AdBlockRule.matchOther"></a> |
1111 </dl> |
|
1112 <a NAME="AdBlockRule.matchOther" ID="AdBlockRule.matchOther"></a> |
860 <h4>AdBlockRule.matchOther</h4> |
1113 <h4>AdBlockRule.matchOther</h4> |
861 <b>matchOther</b>(<i>req</i>) |
1114 <b>matchOther</b>(<i>req</i>) |
|
1115 |
862 <p> |
1116 <p> |
863 Public method to match any other rule. |
1117 Public method to match any other rule. |
864 </p><dl> |
1118 </p> |
|
1119 <dl> |
|
1120 |
865 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1121 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
866 <dd> |
1122 <dd> |
867 request object to check |
1123 request object to check |
868 </dd> |
1124 </dd> |
869 </dl><dl> |
1125 </dl> |
870 <dt>Returns:</dt> |
1126 <dl> |
871 <dd> |
1127 <dt>Returns:</dt> |
872 flag indicating a match |
1128 <dd> |
873 </dd> |
1129 flag indicating a match |
874 </dl><dl> |
1130 </dd> |
875 <dt>Return Type:</dt> |
1131 </dl> |
876 <dd> |
1132 <dl> |
877 bool |
1133 <dt>Return Type:</dt> |
878 </dd> |
1134 <dd> |
879 </dl><a NAME="AdBlockRule.matchPing" ID="AdBlockRule.matchPing"></a> |
1135 bool |
|
1136 </dd> |
|
1137 </dl> |
|
1138 <a NAME="AdBlockRule.matchPing" ID="AdBlockRule.matchPing"></a> |
880 <h4>AdBlockRule.matchPing</h4> |
1139 <h4>AdBlockRule.matchPing</h4> |
881 <b>matchPing</b>(<i>req</i>) |
1140 <b>matchPing</b>(<i>req</i>) |
|
1141 |
882 <p> |
1142 <p> |
883 Public method to match a Ping rule. |
1143 Public method to match a Ping rule. |
884 </p><dl> |
1144 </p> |
|
1145 <dl> |
|
1146 |
885 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1147 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
886 <dd> |
1148 <dd> |
887 request object to check |
1149 request object to check |
888 </dd> |
1150 </dd> |
889 </dl><dl> |
1151 </dl> |
890 <dt>Returns:</dt> |
1152 <dl> |
891 <dd> |
1153 <dt>Returns:</dt> |
892 flag indicating a match |
1154 <dd> |
893 </dd> |
1155 flag indicating a match |
894 </dl><dl> |
1156 </dd> |
895 <dt>Return Type:</dt> |
1157 </dl> |
896 <dd> |
1158 <dl> |
897 bool |
1159 <dt>Return Type:</dt> |
898 </dd> |
1160 <dd> |
899 </dl><a NAME="AdBlockRule.matchScript" ID="AdBlockRule.matchScript"></a> |
1161 bool |
|
1162 </dd> |
|
1163 </dl> |
|
1164 <a NAME="AdBlockRule.matchScript" ID="AdBlockRule.matchScript"></a> |
900 <h4>AdBlockRule.matchScript</h4> |
1165 <h4>AdBlockRule.matchScript</h4> |
901 <b>matchScript</b>(<i>req</i>) |
1166 <b>matchScript</b>(<i>req</i>) |
|
1167 |
902 <p> |
1168 <p> |
903 Public method to match a Script rule. |
1169 Public method to match a Script rule. |
904 </p><dl> |
1170 </p> |
|
1171 <dl> |
|
1172 |
905 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1173 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
906 <dd> |
1174 <dd> |
907 request object to check |
1175 request object to check |
908 </dd> |
1176 </dd> |
909 </dl><dl> |
1177 </dl> |
910 <dt>Returns:</dt> |
1178 <dl> |
911 <dd> |
1179 <dt>Returns:</dt> |
912 flag indicating a match |
1180 <dd> |
913 </dd> |
1181 flag indicating a match |
914 </dl><dl> |
1182 </dd> |
915 <dt>Return Type:</dt> |
1183 </dl> |
916 <dd> |
1184 <dl> |
917 bool |
1185 <dt>Return Type:</dt> |
918 </dd> |
1186 <dd> |
919 </dl><a NAME="AdBlockRule.matchString" ID="AdBlockRule.matchString"></a> |
1187 bool |
|
1188 </dd> |
|
1189 </dl> |
|
1190 <a NAME="AdBlockRule.matchString" ID="AdBlockRule.matchString"></a> |
920 <h4>AdBlockRule.matchString</h4> |
1191 <h4>AdBlockRule.matchString</h4> |
921 <b>matchString</b>(<i></i>) |
1192 <b>matchString</b>(<i></i>) |
|
1193 |
922 <p> |
1194 <p> |
923 Public method to get the match string. |
1195 Public method to get the match string. |
924 </p><dl> |
1196 </p> |
|
1197 <dl> |
925 <dt>Returns:</dt> |
1198 <dt>Returns:</dt> |
926 <dd> |
1199 <dd> |
927 match string |
1200 match string |
928 </dd> |
1201 </dd> |
929 </dl><dl> |
1202 </dl> |
|
1203 <dl> |
930 <dt>Return Type:</dt> |
1204 <dt>Return Type:</dt> |
931 <dd> |
1205 <dd> |
932 str |
1206 str |
933 </dd> |
1207 </dd> |
934 </dl><a NAME="AdBlockRule.matchStyleSheet" ID="AdBlockRule.matchStyleSheet"></a> |
1208 </dl> |
|
1209 <a NAME="AdBlockRule.matchStyleSheet" ID="AdBlockRule.matchStyleSheet"></a> |
935 <h4>AdBlockRule.matchStyleSheet</h4> |
1210 <h4>AdBlockRule.matchStyleSheet</h4> |
936 <b>matchStyleSheet</b>(<i>req</i>) |
1211 <b>matchStyleSheet</b>(<i>req</i>) |
|
1212 |
937 <p> |
1213 <p> |
938 Public method to match a StyleSheet rule. |
1214 Public method to match a StyleSheet rule. |
939 </p><dl> |
1215 </p> |
|
1216 <dl> |
|
1217 |
940 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1218 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
941 <dd> |
1219 <dd> |
942 request object to check |
1220 request object to check |
943 </dd> |
1221 </dd> |
944 </dl><dl> |
1222 </dl> |
945 <dt>Returns:</dt> |
1223 <dl> |
946 <dd> |
1224 <dt>Returns:</dt> |
947 flag indicating a match |
1225 <dd> |
948 </dd> |
1226 flag indicating a match |
949 </dl><dl> |
1227 </dd> |
950 <dt>Return Type:</dt> |
1228 </dl> |
951 <dd> |
1229 <dl> |
952 bool |
1230 <dt>Return Type:</dt> |
953 </dd> |
1231 <dd> |
954 </dl><a NAME="AdBlockRule.matchSubdocument" ID="AdBlockRule.matchSubdocument"></a> |
1232 bool |
|
1233 </dd> |
|
1234 </dl> |
|
1235 <a NAME="AdBlockRule.matchSubdocument" ID="AdBlockRule.matchSubdocument"></a> |
955 <h4>AdBlockRule.matchSubdocument</h4> |
1236 <h4>AdBlockRule.matchSubdocument</h4> |
956 <b>matchSubdocument</b>(<i>req</i>) |
1237 <b>matchSubdocument</b>(<i>req</i>) |
|
1238 |
957 <p> |
1239 <p> |
958 Public method to match a sub-document rule. |
1240 Public method to match a sub-document rule. |
959 </p><dl> |
1241 </p> |
|
1242 <dl> |
|
1243 |
960 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1244 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
961 <dd> |
1245 <dd> |
962 request object to check |
1246 request object to check |
963 </dd> |
1247 </dd> |
964 </dl><dl> |
1248 </dl> |
965 <dt>Returns:</dt> |
1249 <dl> |
966 <dd> |
1250 <dt>Returns:</dt> |
967 flag indicating a match |
1251 <dd> |
968 </dd> |
1252 flag indicating a match |
969 </dl><dl> |
1253 </dd> |
|
1254 </dl> |
|
1255 <dl> |
970 <dt>Return Type:</dt> |
1256 <dt>Return Type:</dt> |
971 <dd> |
1257 <dd> |
972 boolean |
1258 boolean |
973 </dd> |
1259 </dd> |
974 </dl><a NAME="AdBlockRule.matchThirdParty" ID="AdBlockRule.matchThirdParty"></a> |
1260 </dl> |
|
1261 <a NAME="AdBlockRule.matchThirdParty" ID="AdBlockRule.matchThirdParty"></a> |
975 <h4>AdBlockRule.matchThirdParty</h4> |
1262 <h4>AdBlockRule.matchThirdParty</h4> |
976 <b>matchThirdParty</b>(<i>req</i>) |
1263 <b>matchThirdParty</b>(<i>req</i>) |
|
1264 |
977 <p> |
1265 <p> |
978 Public method to match a third-party rule. |
1266 Public method to match a third-party rule. |
979 </p><dl> |
1267 </p> |
|
1268 <dl> |
|
1269 |
980 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1270 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
981 <dd> |
1271 <dd> |
982 request object to check |
1272 request object to check |
983 </dd> |
1273 </dd> |
984 </dl><dl> |
1274 </dl> |
985 <dt>Returns:</dt> |
1275 <dl> |
986 <dd> |
1276 <dt>Returns:</dt> |
987 flag indicating a match |
1277 <dd> |
988 </dd> |
1278 flag indicating a match |
989 </dl><dl> |
1279 </dd> |
|
1280 </dl> |
|
1281 <dl> |
990 <dt>Return Type:</dt> |
1282 <dt>Return Type:</dt> |
991 <dd> |
1283 <dd> |
992 boolean |
1284 boolean |
993 </dd> |
1285 </dd> |
994 </dl><a NAME="AdBlockRule.matchXmlHttpRequest" ID="AdBlockRule.matchXmlHttpRequest"></a> |
1286 </dl> |
|
1287 <a NAME="AdBlockRule.matchXmlHttpRequest" ID="AdBlockRule.matchXmlHttpRequest"></a> |
995 <h4>AdBlockRule.matchXmlHttpRequest</h4> |
1288 <h4>AdBlockRule.matchXmlHttpRequest</h4> |
996 <b>matchXmlHttpRequest</b>(<i>req</i>) |
1289 <b>matchXmlHttpRequest</b>(<i>req</i>) |
|
1290 |
997 <p> |
1291 <p> |
998 Public method to match a XmlHttpRequest rule. |
1292 Public method to match a XmlHttpRequest rule. |
999 </p><dl> |
1293 </p> |
|
1294 <dl> |
|
1295 |
1000 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1296 <dt><i>req</i> (QWebEngineUrlRequestInfo)</dt> |
1001 <dd> |
1297 <dd> |
1002 request object to check |
1298 request object to check |
1003 </dd> |
1299 </dd> |
1004 </dl><dl> |
1300 </dl> |
1005 <dt>Returns:</dt> |
1301 <dl> |
1006 <dd> |
1302 <dt>Returns:</dt> |
1007 flag indicating a match |
1303 <dd> |
1008 </dd> |
1304 flag indicating a match |
1009 </dl><dl> |
1305 </dd> |
1010 <dt>Return Type:</dt> |
1306 </dl> |
1011 <dd> |
1307 <dl> |
1012 bool |
1308 <dt>Return Type:</dt> |
1013 </dd> |
1309 <dd> |
1014 </dl><a NAME="AdBlockRule.networkMatch" ID="AdBlockRule.networkMatch"></a> |
1310 bool |
|
1311 </dd> |
|
1312 </dl> |
|
1313 <a NAME="AdBlockRule.networkMatch" ID="AdBlockRule.networkMatch"></a> |
1015 <h4>AdBlockRule.networkMatch</h4> |
1314 <h4>AdBlockRule.networkMatch</h4> |
1016 <b>networkMatch</b>(<i>request, domain, encodedUrl</i>) |
1315 <b>networkMatch</b>(<i>request, domain, encodedUrl</i>) |
|
1316 |
1017 <p> |
1317 <p> |
1018 Public method to check the rule for a match. |
1318 Public method to check the rule for a match. |
1019 </p><dl> |
1319 </p> |
|
1320 <dl> |
|
1321 |
1020 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt> |
1322 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt> |
1021 <dd> |
1323 <dd> |
1022 reference to the network request |
1324 reference to the network request |
1023 </dd><dt><i>domain</i> (str)</dt> |
1325 </dd> |
|
1326 <dt><i>domain</i> (str)</dt> |
1024 <dd> |
1327 <dd> |
1025 domain name |
1328 domain name |
1026 </dd><dt><i>encodedUrl</i> (str)</dt> |
1329 </dd> |
|
1330 <dt><i>encodedUrl</i> (str)</dt> |
1027 <dd> |
1331 <dd> |
1028 string encoded URL to be checked |
1332 string encoded URL to be checked |
1029 </dd> |
1333 </dd> |
1030 </dl><dl> |
1334 </dl> |
1031 <dt>Returns:</dt> |
1335 <dl> |
1032 <dd> |
1336 <dt>Returns:</dt> |
1033 flag indicating a match |
1337 <dd> |
1034 </dd> |
1338 flag indicating a match |
1035 </dl><dl> |
1339 </dd> |
1036 <dt>Return Type:</dt> |
1340 </dl> |
1037 <dd> |
1341 <dl> |
1038 bool |
1342 <dt>Return Type:</dt> |
1039 </dd> |
1343 <dd> |
1040 </dl><a NAME="AdBlockRule.ruleExceptions" ID="AdBlockRule.ruleExceptions"></a> |
1344 bool |
|
1345 </dd> |
|
1346 </dl> |
|
1347 <a NAME="AdBlockRule.ruleExceptions" ID="AdBlockRule.ruleExceptions"></a> |
1041 <h4>AdBlockRule.ruleExceptions</h4> |
1348 <h4>AdBlockRule.ruleExceptions</h4> |
1042 <b>ruleExceptions</b>(<i></i>) |
1349 <b>ruleExceptions</b>(<i></i>) |
|
1350 |
1043 <p> |
1351 <p> |
1044 Public method to get the rule exceptions. |
1352 Public method to get the rule exceptions. |
1045 </p><dl> |
1353 </p> |
|
1354 <dl> |
1046 <dt>Returns:</dt> |
1355 <dt>Returns:</dt> |
1047 <dd> |
1356 <dd> |
1048 rule exceptions |
1357 rule exceptions |
1049 </dd> |
1358 </dd> |
1050 </dl><dl> |
1359 </dl> |
|
1360 <dl> |
1051 <dt>Return Type:</dt> |
1361 <dt>Return Type:</dt> |
1052 <dd> |
1362 <dd> |
1053 AdBlockRuleOption |
1363 AdBlockRuleOption |
1054 </dd> |
1364 </dd> |
1055 </dl><a NAME="AdBlockRule.ruleOptions" ID="AdBlockRule.ruleOptions"></a> |
1365 </dl> |
|
1366 <a NAME="AdBlockRule.ruleOptions" ID="AdBlockRule.ruleOptions"></a> |
1056 <h4>AdBlockRule.ruleOptions</h4> |
1367 <h4>AdBlockRule.ruleOptions</h4> |
1057 <b>ruleOptions</b>(<i></i>) |
1368 <b>ruleOptions</b>(<i></i>) |
|
1369 |
1058 <p> |
1370 <p> |
1059 Public method to get the rule options. |
1371 Public method to get the rule options. |
1060 </p><dl> |
1372 </p> |
|
1373 <dl> |
1061 <dt>Returns:</dt> |
1374 <dt>Returns:</dt> |
1062 <dd> |
1375 <dd> |
1063 rule options |
1376 rule options |
1064 </dd> |
1377 </dd> |
1065 </dl><dl> |
1378 </dl> |
|
1379 <dl> |
1066 <dt>Return Type:</dt> |
1380 <dt>Return Type:</dt> |
1067 <dd> |
1381 <dd> |
1068 AdBlockRuleOption |
1382 AdBlockRuleOption |
1069 </dd> |
1383 </dd> |
1070 </dl><a NAME="AdBlockRule.ruleType" ID="AdBlockRule.ruleType"></a> |
1384 </dl> |
|
1385 <a NAME="AdBlockRule.ruleType" ID="AdBlockRule.ruleType"></a> |
1071 <h4>AdBlockRule.ruleType</h4> |
1386 <h4>AdBlockRule.ruleType</h4> |
1072 <b>ruleType</b>(<i></i>) |
1387 <b>ruleType</b>(<i></i>) |
|
1388 |
1073 <p> |
1389 <p> |
1074 Public method to get the rule type. |
1390 Public method to get the rule type. |
1075 </p><dl> |
1391 </p> |
|
1392 <dl> |
1076 <dt>Returns:</dt> |
1393 <dt>Returns:</dt> |
1077 <dd> |
1394 <dd> |
1078 rule type |
1395 rule type |
1079 </dd> |
1396 </dd> |
1080 </dl><dl> |
1397 </dl> |
|
1398 <dl> |
1081 <dt>Return Type:</dt> |
1399 <dt>Return Type:</dt> |
1082 <dd> |
1400 <dd> |
1083 AdBlockRuleType |
1401 AdBlockRuleType |
1084 </dd> |
1402 </dd> |
1085 </dl><a NAME="AdBlockRule.setEnabled" ID="AdBlockRule.setEnabled"></a> |
1403 </dl> |
|
1404 <a NAME="AdBlockRule.setEnabled" ID="AdBlockRule.setEnabled"></a> |
1086 <h4>AdBlockRule.setEnabled</h4> |
1405 <h4>AdBlockRule.setEnabled</h4> |
1087 <b>setEnabled</b>(<i>enabled</i>) |
1406 <b>setEnabled</b>(<i>enabled</i>) |
|
1407 |
1088 <p> |
1408 <p> |
1089 Public method to set the rule's enabled state. |
1409 Public method to set the rule's enabled state. |
1090 </p><dl> |
1410 </p> |
|
1411 <dl> |
|
1412 |
1091 <dt><i>enabled</i> (bool)</dt> |
1413 <dt><i>enabled</i> (bool)</dt> |
1092 <dd> |
1414 <dd> |
1093 flag indicating the new enabled state |
1415 flag indicating the new enabled state |
1094 </dd> |
1416 </dd> |
1095 </dl><a NAME="AdBlockRule.setException" ID="AdBlockRule.setException"></a> |
1417 </dl> |
|
1418 <a NAME="AdBlockRule.setException" ID="AdBlockRule.setException"></a> |
1096 <h4>AdBlockRule.setException</h4> |
1419 <h4>AdBlockRule.setException</h4> |
1097 <b>setException</b>(<i>exception</i>) |
1420 <b>setException</b>(<i>exception</i>) |
|
1421 |
1098 <p> |
1422 <p> |
1099 Public method to set the rule's exception flag. |
1423 Public method to set the rule's exception flag. |
1100 </p><dl> |
1424 </p> |
|
1425 <dl> |
|
1426 |
1101 <dt><i>exception</i> (bool)</dt> |
1427 <dt><i>exception</i> (bool)</dt> |
1102 <dd> |
1428 <dd> |
1103 flag indicating an exception rule |
1429 flag indicating an exception rule |
1104 </dd> |
1430 </dd> |
1105 </dl><a NAME="AdBlockRule.setFilter" ID="AdBlockRule.setFilter"></a> |
1431 </dl> |
|
1432 <a NAME="AdBlockRule.setFilter" ID="AdBlockRule.setFilter"></a> |
1106 <h4>AdBlockRule.setFilter</h4> |
1433 <h4>AdBlockRule.setFilter</h4> |
1107 <b>setFilter</b>(<i>filterRule</i>) |
1434 <b>setFilter</b>(<i>filterRule</i>) |
|
1435 |
1108 <p> |
1436 <p> |
1109 Public method to set the rule filter string. |
1437 Public method to set the rule filter string. |
1110 </p><dl> |
1438 </p> |
|
1439 <dl> |
|
1440 |
1111 <dt><i>filterRule</i> (str)</dt> |
1441 <dt><i>filterRule</i> (str)</dt> |
1112 <dd> |
1442 <dd> |
1113 rule filter string |
1443 rule filter string |
1114 </dd> |
1444 </dd> |
1115 </dl><a NAME="AdBlockRule.setOption" ID="AdBlockRule.setOption"></a> |
1445 </dl> |
|
1446 <a NAME="AdBlockRule.setOption" ID="AdBlockRule.setOption"></a> |
1116 <h4>AdBlockRule.setOption</h4> |
1447 <h4>AdBlockRule.setOption</h4> |
1117 <b>setOption</b>(<i>opt</i>) |
1448 <b>setOption</b>(<i>opt</i>) |
|
1449 |
1118 <p> |
1450 <p> |
1119 Public method to set the given option. |
1451 Public method to set the given option. |
1120 </p><dl> |
1452 </p> |
|
1453 <dl> |
|
1454 |
1121 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
1455 <dt><i>opt</i> (AdBlockRuleOption)</dt> |
1122 <dd> |
1456 <dd> |
1123 option to be set |
1457 option to be set |
1124 </dd> |
1458 </dd> |
1125 </dl><a NAME="AdBlockRule.setSubscription" ID="AdBlockRule.setSubscription"></a> |
1459 </dl> |
|
1460 <a NAME="AdBlockRule.setSubscription" ID="AdBlockRule.setSubscription"></a> |
1126 <h4>AdBlockRule.setSubscription</h4> |
1461 <h4>AdBlockRule.setSubscription</h4> |
1127 <b>setSubscription</b>(<i>subscription</i>) |
1462 <b>setSubscription</b>(<i>subscription</i>) |
|
1463 |
1128 <p> |
1464 <p> |
1129 Public method to set the subscription this rule belongs to. |
1465 Public method to set the subscription this rule belongs to. |
1130 </p><dl> |
1466 </p> |
|
1467 <dl> |
|
1468 |
1131 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
1469 <dt><i>subscription</i> (AdBlockSubscription)</dt> |
1132 <dd> |
1470 <dd> |
1133 subscription of the rule |
1471 subscription of the rule |
1134 </dd> |
1472 </dd> |
1135 </dl><a NAME="AdBlockRule.subscription" ID="AdBlockRule.subscription"></a> |
1473 </dl> |
|
1474 <a NAME="AdBlockRule.subscription" ID="AdBlockRule.subscription"></a> |
1136 <h4>AdBlockRule.subscription</h4> |
1475 <h4>AdBlockRule.subscription</h4> |
1137 <b>subscription</b>(<i></i>) |
1476 <b>subscription</b>(<i></i>) |
|
1477 |
1138 <p> |
1478 <p> |
1139 Public method to get the subscription this rule belongs to. |
1479 Public method to get the subscription this rule belongs to. |
1140 </p><dl> |
1480 </p> |
|
1481 <dl> |
1141 <dt>Returns:</dt> |
1482 <dt>Returns:</dt> |
1142 <dd> |
1483 <dd> |
1143 subscription of the rule |
1484 subscription of the rule |
1144 </dd> |
1485 </dd> |
1145 </dl><dl> |
1486 </dl> |
|
1487 <dl> |
1146 <dt>Return Type:</dt> |
1488 <dt>Return Type:</dt> |
1147 <dd> |
1489 <dd> |
1148 AdBlockSubscription |
1490 AdBlockSubscription |
1149 </dd> |
1491 </dd> |
1150 </dl><a NAME="AdBlockRule.urlMatch" ID="AdBlockRule.urlMatch"></a> |
1492 </dl> |
|
1493 <a NAME="AdBlockRule.urlMatch" ID="AdBlockRule.urlMatch"></a> |
1151 <h4>AdBlockRule.urlMatch</h4> |
1494 <h4>AdBlockRule.urlMatch</h4> |
1152 <b>urlMatch</b>(<i>url</i>) |
1495 <b>urlMatch</b>(<i>url</i>) |
|
1496 |
1153 <p> |
1497 <p> |
1154 Public method to check an URL against the rule. |
1498 Public method to check an URL against the rule. |
1155 </p><dl> |
1499 </p> |
|
1500 <dl> |
|
1501 |
1156 <dt><i>url</i> (QUrl)</dt> |
1502 <dt><i>url</i> (QUrl)</dt> |
1157 <dd> |
1503 <dd> |
1158 URL to check |
1504 URL to check |
1159 </dd> |
1505 </dd> |
1160 </dl><dl> |
1506 </dl> |
1161 <dt>Returns:</dt> |
1507 <dl> |
1162 <dd> |
1508 <dt>Returns:</dt> |
1163 flag indicating a match |
1509 <dd> |
1164 </dd> |
1510 flag indicating a match |
1165 </dl><dl> |
1511 </dd> |
|
1512 </dl> |
|
1513 <dl> |
1166 <dt>Return Type:</dt> |
1514 <dt>Return Type:</dt> |
1167 <dd> |
1515 <dd> |
1168 bool |
1516 bool |
1169 </dd> |
1517 </dd> |
1170 </dl> |
1518 </dl> |
1171 <div align="right"><a href="#top">Up</a></div> |
1519 <div align="right"><a href="#top">Up</a></div> |
1172 <hr /><hr /> |
1520 <hr /> |
|
1521 <hr /> |
1173 <a NAME="AdBlockRuleOption" ID="AdBlockRuleOption"></a> |
1522 <a NAME="AdBlockRuleOption" ID="AdBlockRuleOption"></a> |
1174 <h2>AdBlockRuleOption</h2> |
1523 <h2>AdBlockRuleOption</h2> |
|
1524 |
1175 <p> |
1525 <p> |
1176 Class implementing the rule option enum. |
1526 Class implementing the rule option enum. |
1177 </p> |
1527 </p> |
1178 <h3>Derived from</h3> |
1528 <h3>Derived from</h3> |
1179 IntEnum |
1529 IntEnum |
1180 <h3>Class Attributes</h3> |
1530 <h3>Class Attributes</h3> |
|
1531 |
1181 <table> |
1532 <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> |
1533 <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> |
1534 </table> |
1184 <h3>Class Methods</h3> |
1535 <h3>Class Methods</h3> |
|
1536 |
1185 <table> |
1537 <table> |
1186 <tr><td>None</td></tr> |
1538 <tr><td>None</td></tr> |
1187 </table> |
1539 </table> |
1188 <h3>Methods</h3> |
1540 <h3>Methods</h3> |
|
1541 |
1189 <table> |
1542 <table> |
1190 <tr><td>None</td></tr> |
1543 <tr><td>None</td></tr> |
1191 </table> |
1544 </table> |
1192 <h3>Static Methods</h3> |
1545 <h3>Static Methods</h3> |
|
1546 |
1193 <table> |
1547 <table> |
1194 <tr><td>None</td></tr> |
1548 <tr><td>None</td></tr> |
1195 </table> |
1549 </table> |
1196 |
1550 |
1197 <div align="right"><a href="#top">Up</a></div> |
1551 <div align="right"><a href="#top">Up</a></div> |
1198 <hr /><hr /> |
1552 <hr /> |
|
1553 <hr /> |
1199 <a NAME="AdBlockRuleType" ID="AdBlockRuleType"></a> |
1554 <a NAME="AdBlockRuleType" ID="AdBlockRuleType"></a> |
1200 <h2>AdBlockRuleType</h2> |
1555 <h2>AdBlockRuleType</h2> |
|
1556 |
1201 <p> |
1557 <p> |
1202 Class implementing the rule type enum. |
1558 Class implementing the rule type enum. |
1203 </p> |
1559 </p> |
1204 <h3>Derived from</h3> |
1560 <h3>Derived from</h3> |
1205 IntEnum |
1561 IntEnum |
1206 <h3>Class Attributes</h3> |
1562 <h3>Class Attributes</h3> |
|
1563 |
1207 <table> |
1564 <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> |
1565 <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> |
1566 </table> |
1210 <h3>Class Methods</h3> |
1567 <h3>Class Methods</h3> |
|
1568 |
1211 <table> |
1569 <table> |
1212 <tr><td>None</td></tr> |
1570 <tr><td>None</td></tr> |
1213 </table> |
1571 </table> |
1214 <h3>Methods</h3> |
1572 <h3>Methods</h3> |
|
1573 |
1215 <table> |
1574 <table> |
1216 <tr><td>None</td></tr> |
1575 <tr><td>None</td></tr> |
1217 </table> |
1576 </table> |
1218 <h3>Static Methods</h3> |
1577 <h3>Static Methods</h3> |
|
1578 |
1219 <table> |
1579 <table> |
1220 <tr><td>None</td></tr> |
1580 <tr><td>None</td></tr> |
1221 </table> |
1581 </table> |
1222 |
1582 |
1223 <div align="right"><a href="#top">Up</a></div> |
1583 <div align="right"><a href="#top">Up</a></div> |
1224 <hr /><hr /> |
1584 <hr /> |
|
1585 <hr /> |
1225 <a NAME="toSecondLevelDomain" ID="toSecondLevelDomain"></a> |
1586 <a NAME="toSecondLevelDomain" ID="toSecondLevelDomain"></a> |
1226 <h2>toSecondLevelDomain</h2> |
1587 <h2>toSecondLevelDomain</h2> |
1227 <b>toSecondLevelDomain</b>(<i>url</i>) |
1588 <b>toSecondLevelDomain</b>(<i>url</i>) |
|
1589 |
1228 <p> |
1590 <p> |
1229 Module function to get a second level domain from the given URL. |
1591 Module function to get a second level domain from the given URL. |
1230 </p><dl> |
1592 </p> |
|
1593 <dl> |
|
1594 |
1231 <dt><i>url</i> (QUrl)</dt> |
1595 <dt><i>url</i> (QUrl)</dt> |
1232 <dd> |
1596 <dd> |
1233 URL to extract domain from |
1597 URL to extract domain from |
1234 </dd> |
1598 </dd> |
1235 </dl><dl> |
1599 </dl> |
|
1600 <dl> |
1236 <dt>Returns:</dt> |
1601 <dt>Returns:</dt> |
1237 <dd> |
1602 <dd> |
1238 name of second level domain |
1603 name of second level domain |
1239 </dd> |
1604 </dd> |
1240 </dl><dl> |
1605 </dl> |
|
1606 <dl> |
1241 <dt>Return Type:</dt> |
1607 <dt>Return Type:</dt> |
1242 <dd> |
1608 <dd> |
1243 str |
1609 str |
1244 </dd> |
1610 </dd> |
1245 </dl> |
1611 </dl> |