eric7/Documentation/Source/eric7.WebBrowser.AdBlock.AdBlockMatcher.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.WebBrowser.AdBlock.AdBlockMatcher</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.AdBlockMatcher</h1>
24
25 <p>
26 Module implementing the AdBlock matcher.
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="#AdBlockMatcher">AdBlockMatcher</a></td>
39 <td>Class implementing the AdBlock matcher.</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="AdBlockMatcher" ID="AdBlockMatcher"></a>
50 <h2>AdBlockMatcher</h2>
51
52 <p>
53 Class implementing the AdBlock matcher.
54 </p>
55 <h3>Derived from</h3>
56 QObject
57 <h3>Class Attributes</h3>
58
59 <table>
60 <tr><td>None</td></tr>
61 </table>
62 <h3>Class Methods</h3>
63
64 <table>
65 <tr><td>None</td></tr>
66 </table>
67 <h3>Methods</h3>
68
69 <table>
70
71 <tr>
72 <td><a href="#AdBlockMatcher.__init__">AdBlockMatcher</a></td>
73 <td>Constructor</td>
74 </tr>
75 <tr>
76 <td><a href="#AdBlockMatcher.adBlockDisabledForUrl">adBlockDisabledForUrl</a></td>
77 <td>Public method to check, if AdBlock is disabled for the given URL.</td>
78 </tr>
79 <tr>
80 <td><a href="#AdBlockMatcher.clear">clear</a></td>
81 <td>Public slot to clear the internal structures.</td>
82 </tr>
83 <tr>
84 <td><a href="#AdBlockMatcher.elemHideDisabledForUrl">elemHideDisabledForUrl</a></td>
85 <td>Public method to check, if element hiding is disabled for the given URL.</td>
86 </tr>
87 <tr>
88 <td><a href="#AdBlockMatcher.elementHidingRules">elementHidingRules</a></td>
89 <td>Public method to get the element hiding rules.</td>
90 </tr>
91 <tr>
92 <td><a href="#AdBlockMatcher.elementHidingRulesForDomain">elementHidingRulesForDomain</a></td>
93 <td>Public method to get the element hiding rules for the given domain.</td>
94 </tr>
95 <tr>
96 <td><a href="#AdBlockMatcher.match">match</a></td>
97 <td>Public method to match a request.</td>
98 </tr>
99 <tr>
100 <td><a href="#AdBlockMatcher.update">update</a></td>
101 <td>Public slot to update the internal state.</td>
102 </tr>
103 </table>
104 <h3>Static Methods</h3>
105
106 <table>
107 <tr><td>None</td></tr>
108 </table>
109
110 <a NAME="AdBlockMatcher.__init__" ID="AdBlockMatcher.__init__"></a>
111 <h4>AdBlockMatcher (Constructor)</h4>
112 <b>AdBlockMatcher</b>(<i>manager</i>)
113
114 <p>
115 Constructor
116 </p>
117 <dl>
118
119 <dt><i>manager</i> (AdBlockManager)</dt>
120 <dd>
121 reference to the AdBlock manager object
122 </dd>
123 </dl>
124 <a NAME="AdBlockMatcher.adBlockDisabledForUrl" ID="AdBlockMatcher.adBlockDisabledForUrl"></a>
125 <h4>AdBlockMatcher.adBlockDisabledForUrl</h4>
126 <b>adBlockDisabledForUrl</b>(<i>url</i>)
127
128 <p>
129 Public method to check, if AdBlock is disabled for the given URL.
130 </p>
131 <dl>
132
133 <dt><i>url</i> (QUrl)</dt>
134 <dd>
135 URL to check
136 </dd>
137 </dl>
138 <dl>
139 <dt>Return:</dt>
140 <dd>
141 flag indicating disabled state
142 </dd>
143 </dl>
144 <dl>
145 <dt>Return Type:</dt>
146 <dd>
147 bool
148 </dd>
149 </dl>
150 <a NAME="AdBlockMatcher.clear" ID="AdBlockMatcher.clear"></a>
151 <h4>AdBlockMatcher.clear</h4>
152 <b>clear</b>(<i></i>)
153
154 <p>
155 Public slot to clear the internal structures.
156 </p>
157 <a NAME="AdBlockMatcher.elemHideDisabledForUrl" ID="AdBlockMatcher.elemHideDisabledForUrl"></a>
158 <h4>AdBlockMatcher.elemHideDisabledForUrl</h4>
159 <b>elemHideDisabledForUrl</b>(<i>url</i>)
160
161 <p>
162 Public method to check, if element hiding is disabled for the given
163 URL.
164 </p>
165 <dl>
166
167 <dt><i>url</i> (QUrl)</dt>
168 <dd>
169 URL to check
170 </dd>
171 </dl>
172 <dl>
173 <dt>Return:</dt>
174 <dd>
175 flag indicating disabled state
176 </dd>
177 </dl>
178 <dl>
179 <dt>Return Type:</dt>
180 <dd>
181 bool
182 </dd>
183 </dl>
184 <a NAME="AdBlockMatcher.elementHidingRules" ID="AdBlockMatcher.elementHidingRules"></a>
185 <h4>AdBlockMatcher.elementHidingRules</h4>
186 <b>elementHidingRules</b>(<i></i>)
187
188 <p>
189 Public method to get the element hiding rules.
190 </p>
191 <dl>
192 <dt>Return:</dt>
193 <dd>
194 element hiding rules
195 </dd>
196 </dl>
197 <dl>
198 <dt>Return Type:</dt>
199 <dd>
200 str
201 </dd>
202 </dl>
203 <a NAME="AdBlockMatcher.elementHidingRulesForDomain" ID="AdBlockMatcher.elementHidingRulesForDomain"></a>
204 <h4>AdBlockMatcher.elementHidingRulesForDomain</h4>
205 <b>elementHidingRulesForDomain</b>(<i>domain</i>)
206
207 <p>
208 Public method to get the element hiding rules for the given domain.
209 </p>
210 <dl>
211
212 <dt><i>domain</i> (str)</dt>
213 <dd>
214 domain name
215 </dd>
216 </dl>
217 <dl>
218 <dt>Return:</dt>
219 <dd>
220 element hiding rules
221 </dd>
222 </dl>
223 <dl>
224 <dt>Return Type:</dt>
225 <dd>
226 str
227 </dd>
228 </dl>
229 <a NAME="AdBlockMatcher.match" ID="AdBlockMatcher.match"></a>
230 <h4>AdBlockMatcher.match</h4>
231 <b>match</b>(<i>request, urlDomain, urlString</i>)
232
233 <p>
234 Public method to match a request.
235 </p>
236 <dl>
237
238 <dt><i>request</i> (QWebEngineUrlRequestInfo)</dt>
239 <dd>
240 URL request to be matched
241 </dd>
242 <dt><i>urlDomain</i> (str)</dt>
243 <dd>
244 domain of the URL
245 </dd>
246 <dt><i>urlString</i> (str)</dt>
247 <dd>
248 requested URL as a lowercase string
249 </dd>
250 </dl>
251 <dl>
252 <dt>Return:</dt>
253 <dd>
254 reference to the matched rule
255 </dd>
256 </dl>
257 <dl>
258 <dt>Return Type:</dt>
259 <dd>
260 AdBlockRule
261 </dd>
262 </dl>
263 <a NAME="AdBlockMatcher.update" ID="AdBlockMatcher.update"></a>
264 <h4>AdBlockMatcher.update</h4>
265 <b>update</b>(<i></i>)
266
267 <p>
268 Public slot to update the internal state.
269 </p>
270 <div align="right"><a href="#top">Up</a></div>
271 <hr />
272 </body></html>

eric ide

mercurial