Documentation/Source/eric5.Helpviewer.AdBlock.AdBlockSubscription.html

changeset 1960
d8c45fe8a1b9
parent 1854
191efdc54c62
child 1970
02cf3bac079b
equal deleted inserted replaced
1957:2fed7bc4ad83 1960:d8c45fe8a1b9
80 <td>Private method to populate the various rule caches.</td> 80 <td>Private method to populate the various rule caches.</td>
81 </tr><tr> 81 </tr><tr>
82 <td><a href="#AdBlockSubscription.__rulesDownloaded">__rulesDownloaded</a></td> 82 <td><a href="#AdBlockSubscription.__rulesDownloaded">__rulesDownloaded</a></td>
83 <td>Private slot to deal with the downloaded rules.</td> 83 <td>Private slot to deal with the downloaded rules.</td>
84 </tr><tr> 84 </tr><tr>
85 <td><a href="#AdBlockSubscription.adBlockDisabledForUrl">adBlockDisabledForUrl</a></td>
86 <td>Public method to check, if AdBlock is disabled for the given URL.</td>
87 </tr><tr>
85 <td><a href="#AdBlockSubscription.addRule">addRule</a></td> 88 <td><a href="#AdBlockSubscription.addRule">addRule</a></td>
86 <td>Public method to add a rule.</td> 89 <td>Public method to add a rule.</td>
87 </tr><tr> 90 </tr><tr>
88 <td><a href="#AdBlockSubscription.allRules">allRules</a></td> 91 <td><a href="#AdBlockSubscription.allRules">allRules</a></td>
89 <td>Public method to get the list of rules.</td> 92 <td>Public method to get the list of rules.</td>
90 </tr><tr> 93 </tr><tr>
91 <td><a href="#AdBlockSubscription.allow">allow</a></td>
92 <td>Public method to check, if the given URL is allowed.</td>
93 </tr><tr>
94 <td><a href="#AdBlockSubscription.block">block</a></td>
95 <td>Public method to check, if the given URL should be blocked.</td>
96 </tr><tr>
97 <td><a href="#AdBlockSubscription.checkForUpdate">checkForUpdate</a></td> 94 <td><a href="#AdBlockSubscription.checkForUpdate">checkForUpdate</a></td>
98 <td>Public method to check for an update.</td> 95 <td>Public method to check for an update.</td>
99 </tr><tr> 96 </tr><tr>
97 <td><a href="#AdBlockSubscription.elemHideDisabledForUrl">elemHideDisabledForUrl</a></td>
98 <td>Public method to check, if element hiding is disabled for the given URL.</td>
99 </tr><tr>
100 <td><a href="#AdBlockSubscription.elementHidingRules">elementHidingRules</a></td>
101 <td>Public method to get the element hiding rules.</td>
102 </tr><tr>
103 <td><a href="#AdBlockSubscription.elementHidingRulesForDomain">elementHidingRulesForDomain</a></td>
104 <td>Public method to get the element hiding rules for the given domain.</td>
105 </tr><tr>
100 <td><a href="#AdBlockSubscription.isEnabled">isEnabled</a></td> 106 <td><a href="#AdBlockSubscription.isEnabled">isEnabled</a></td>
101 <td>Public method to check, if the subscription is enabled.</td> 107 <td>Public method to check, if the subscription is enabled.</td>
102 </tr><tr> 108 </tr><tr>
103 <td><a href="#AdBlockSubscription.lastUpdate">lastUpdate</a></td> 109 <td><a href="#AdBlockSubscription.lastUpdate">lastUpdate</a></td>
104 <td>Public method to get the date and time of the last update.</td> 110 <td>Public method to get the date and time of the last update.</td>
105 </tr><tr> 111 </tr><tr>
106 <td><a href="#AdBlockSubscription.location">location</a></td> 112 <td><a href="#AdBlockSubscription.location">location</a></td>
107 <td>Public method to get the subscription location.</td> 113 <td>Public method to get the subscription location.</td>
108 </tr><tr> 114 </tr><tr>
109 <td><a href="#AdBlockSubscription.pageRules">pageRules</a></td> 115 <td><a href="#AdBlockSubscription.match">match</a></td>
110 <td>Public method to get the page rules of the subscription.</td> 116 <td>Public method to check the subscription for a matching rule.</td>
111 </tr><tr> 117 </tr><tr>
112 <td><a href="#AdBlockSubscription.removeRule">removeRule</a></td> 118 <td><a href="#AdBlockSubscription.removeRule">removeRule</a></td>
113 <td>Public method to remove a rule given the offset.</td> 119 <td>Public method to remove a rule given the offset.</td>
114 </tr><tr> 120 </tr><tr>
115 <td><a href="#AdBlockSubscription.replaceRule">replaceRule</a></td> 121 <td><a href="#AdBlockSubscription.replaceRule">replaceRule</a></td>
135 </tr><tr> 141 </tr><tr>
136 <td><a href="#AdBlockSubscription.updateNow">updateNow</a></td> 142 <td><a href="#AdBlockSubscription.updateNow">updateNow</a></td>
137 <td>Public method to update the subscription immediately.</td> 143 <td>Public method to update the subscription immediately.</td>
138 </tr><tr> 144 </tr><tr>
139 <td><a href="#AdBlockSubscription.url">url</a></td> 145 <td><a href="#AdBlockSubscription.url">url</a></td>
140 <td>Public method to generate the url for this subscription.</td> 146 <td>Public method to generate the URL for this subscription.</td>
141 </tr> 147 </tr>
142 </table> 148 </table>
143 <h3>Static Methods</h3> 149 <h3>Static Methods</h3>
144 <table> 150 <table>
145 <tr><td>None</td></tr> 151 <tr><td>None</td></tr>
183 </p><a NAME="AdBlockSubscription.__rulesDownloaded" ID="AdBlockSubscription.__rulesDownloaded"></a> 189 </p><a NAME="AdBlockSubscription.__rulesDownloaded" ID="AdBlockSubscription.__rulesDownloaded"></a>
184 <h4>AdBlockSubscription.__rulesDownloaded</h4> 190 <h4>AdBlockSubscription.__rulesDownloaded</h4>
185 <b>__rulesDownloaded</b>(<i></i>) 191 <b>__rulesDownloaded</b>(<i></i>)
186 <p> 192 <p>
187 Private slot to deal with the downloaded rules. 193 Private slot to deal with the downloaded rules.
188 </p><a NAME="AdBlockSubscription.addRule" ID="AdBlockSubscription.addRule"></a> 194 </p><a NAME="AdBlockSubscription.adBlockDisabledForUrl" ID="AdBlockSubscription.adBlockDisabledForUrl"></a>
195 <h4>AdBlockSubscription.adBlockDisabledForUrl</h4>
196 <b>adBlockDisabledForUrl</b>(<i>url</i>)
197 <p>
198 Public method to check, if AdBlock is disabled for the given URL.
199 </p><dl>
200 <dt><i>url</i></dt>
201 <dd>
202 URL to check (QUrl)
203 </dd>
204 </dl><dl>
205 <dt>Returns:</dt>
206 <dd>
207 flag indicating disabled state (boolean)
208 </dd>
209 </dl><a NAME="AdBlockSubscription.addRule" ID="AdBlockSubscription.addRule"></a>
189 <h4>AdBlockSubscription.addRule</h4> 210 <h4>AdBlockSubscription.addRule</h4>
190 <b>addRule</b>(<i>rule</i>) 211 <b>addRule</b>(<i>rule</i>)
191 <p> 212 <p>
192 Public method to add a rule. 213 Public method to add a rule.
193 </p><dl> 214 </p><dl>
203 </p><dl> 224 </p><dl>
204 <dt>Returns:</dt> 225 <dt>Returns:</dt>
205 <dd> 226 <dd>
206 list of rules (list of AdBlockRule) 227 list of rules (list of AdBlockRule)
207 </dd> 228 </dd>
208 </dl><a NAME="AdBlockSubscription.allow" ID="AdBlockSubscription.allow"></a>
209 <h4>AdBlockSubscription.allow</h4>
210 <b>allow</b>(<i>urlString</i>)
211 <p>
212 Public method to check, if the given URL is allowed.
213 </p><dl>
214 <dt>Returns:</dt>
215 <dd>
216 reference to the rule object or None (AdBlockRule)
217 </dd>
218 </dl><a NAME="AdBlockSubscription.block" ID="AdBlockSubscription.block"></a>
219 <h4>AdBlockSubscription.block</h4>
220 <b>block</b>(<i>urlString</i>)
221 <p>
222 Public method to check, if the given URL should be blocked.
223 </p><dl>
224 <dt>Returns:</dt>
225 <dd>
226 reference to the rule object or None (AdBlockRule)
227 </dd>
228 </dl><a NAME="AdBlockSubscription.checkForUpdate" ID="AdBlockSubscription.checkForUpdate"></a> 229 </dl><a NAME="AdBlockSubscription.checkForUpdate" ID="AdBlockSubscription.checkForUpdate"></a>
229 <h4>AdBlockSubscription.checkForUpdate</h4> 230 <h4>AdBlockSubscription.checkForUpdate</h4>
230 <b>checkForUpdate</b>(<i></i>) 231 <b>checkForUpdate</b>(<i></i>)
231 <p> 232 <p>
232 Public method to check for an update. 233 Public method to check for an update.
233 </p><a NAME="AdBlockSubscription.isEnabled" ID="AdBlockSubscription.isEnabled"></a> 234 </p><a NAME="AdBlockSubscription.elemHideDisabledForUrl" ID="AdBlockSubscription.elemHideDisabledForUrl"></a>
235 <h4>AdBlockSubscription.elemHideDisabledForUrl</h4>
236 <b>elemHideDisabledForUrl</b>(<i>url</i>)
237 <p>
238 Public method to check, if element hiding is disabled for the given URL.
239 </p><dl>
240 <dt><i>url</i></dt>
241 <dd>
242 URL to check (QUrl)
243 </dd>
244 </dl><dl>
245 <dt>Returns:</dt>
246 <dd>
247 flag indicating disabled state (boolean)
248 </dd>
249 </dl><a NAME="AdBlockSubscription.elementHidingRules" ID="AdBlockSubscription.elementHidingRules"></a>
250 <h4>AdBlockSubscription.elementHidingRules</h4>
251 <b>elementHidingRules</b>(<i></i>)
252 <p>
253 Public method to get the element hiding rules.
254 </p><dl>
255 <dt>Returns:</dt>
256 <dd>
257 element hiding rules (string)
258 </dd>
259 </dl><a NAME="AdBlockSubscription.elementHidingRulesForDomain" ID="AdBlockSubscription.elementHidingRulesForDomain"></a>
260 <h4>AdBlockSubscription.elementHidingRulesForDomain</h4>
261 <b>elementHidingRulesForDomain</b>(<i>domain</i>)
262 <p>
263 Public method to get the element hiding rules for the given domain.
264 </p><dl>
265 <dt><i>domain</i></dt>
266 <dd>
267 domain name (string)
268 </dd>
269 </dl><dl>
270 <dt>Returns:</dt>
271 <dd>
272 element hiding rules (string)
273 </dd>
274 </dl><a NAME="AdBlockSubscription.isEnabled" ID="AdBlockSubscription.isEnabled"></a>
234 <h4>AdBlockSubscription.isEnabled</h4> 275 <h4>AdBlockSubscription.isEnabled</h4>
235 <b>isEnabled</b>(<i></i>) 276 <b>isEnabled</b>(<i></i>)
236 <p> 277 <p>
237 Public method to check, if the subscription is enabled. 278 Public method to check, if the subscription is enabled.
238 </p><dl> 279 </p><dl>
258 </p><dl> 299 </p><dl>
259 <dt>Returns:</dt> 300 <dt>Returns:</dt>
260 <dd> 301 <dd>
261 URL of the subscription location (QUrl) 302 URL of the subscription location (QUrl)
262 </dd> 303 </dd>
263 </dl><a NAME="AdBlockSubscription.pageRules" ID="AdBlockSubscription.pageRules"></a> 304 </dl><a NAME="AdBlockSubscription.match" ID="AdBlockSubscription.match"></a>
264 <h4>AdBlockSubscription.pageRules</h4> 305 <h4>AdBlockSubscription.match</h4>
265 <b>pageRules</b>(<i></i>) 306 <b>match</b>(<i>req, urlDomain, urlString</i>)
266 <p> 307 <p>
267 Public method to get the page rules of the subscription. 308 Public method to check the subscription for a matching rule.
268 </p><dl> 309 </p><dl>
269 <dt>Returns:</dt> 310 <dt><i>req</i></dt>
270 <dd> 311 <dd>
271 list of rule objects (list of AdBlockRule) 312 reference to the network request (QNetworkRequest)
313 </dd><dt><i>urlDomain</i></dt>
314 <dd>
315 domain of the URL (string)
316 </dd><dt><i>urlString</i></dt>
317 <dd>
318 URL (string)
319 </dd>
320 </dl><dl>
321 <dt>Returns:</dt>
322 <dd>
323 reference to the rule object or None (AdBlockRule)
272 </dd> 324 </dd>
273 </dl><a NAME="AdBlockSubscription.removeRule" ID="AdBlockSubscription.removeRule"></a> 325 </dl><a NAME="AdBlockSubscription.removeRule" ID="AdBlockSubscription.removeRule"></a>
274 <h4>AdBlockSubscription.removeRule</h4> 326 <h4>AdBlockSubscription.removeRule</h4>
275 <b>removeRule</b>(<i>offset</i>) 327 <b>removeRule</b>(<i>offset</i>)
276 <p> 328 <p>
355 Public method to update the subscription immediately. 407 Public method to update the subscription immediately.
356 </p><a NAME="AdBlockSubscription.url" ID="AdBlockSubscription.url"></a> 408 </p><a NAME="AdBlockSubscription.url" ID="AdBlockSubscription.url"></a>
357 <h4>AdBlockSubscription.url</h4> 409 <h4>AdBlockSubscription.url</h4>
358 <b>url</b>(<i></i>) 410 <b>url</b>(<i></i>)
359 <p> 411 <p>
360 Public method to generate the url for this subscription. 412 Public method to generate the URL for this subscription.
361 </p><dl> 413 </p><dl>
362 <dt>Returns:</dt> 414 <dt>Returns:</dt>
363 <dd> 415 <dd>
364 AdBlock URL for the subscription (QUrl) 416 AdBlock URL for the subscription (QUrl)
365 </dd> 417 </dd>

eric ide

mercurial