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