src/eric7/Documentation/Source/eric7.WebBrowser.GreaseMonkey.GreaseMonkeyScript.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 10436
f6881d10e995
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.WebBrowser.GreaseMonkey.GreaseMonkeyScript</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.WebBrowser.GreaseMonkey.GreaseMonkeyScript</h1>
10
11 <p>
12 Module implementing the GreaseMonkey script.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#GreaseMonkeyScript">GreaseMonkeyScript</a></td>
25 <td>Class implementing the GreaseMonkey script.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="GreaseMonkeyScript" ID="GreaseMonkeyScript"></a>
36 <h2>GreaseMonkeyScript</h2>
37
38 <p>
39 Class implementing the GreaseMonkey script.
40 </p>
41 <h3>Signals</h3>
42 <dl>
43
44 <dt>scriptChanged()</dt>
45 <dd>
46 emitted to indicate a script change
47 </dd>
48 <dt>updatingChanged(bool)</dt>
49 <dd>
50 emitted to indicate a change of the
51 updating state
52 </dd>
53 </dl>
54 <h3>Derived from</h3>
55 QObject
56 <h3>Class Attributes</h3>
57
58 <table>
59 <tr><td>DocumentEnd</td></tr><tr><td>DocumentIdle</td></tr><tr><td>DocumentStart</td></tr>
60 </table>
61 <h3>Class Methods</h3>
62
63 <table>
64 <tr><td>None</td></tr>
65 </table>
66 <h3>Methods</h3>
67
68 <table>
69
70 <tr>
71 <td><a href="#GreaseMonkeyScript.__init__">GreaseMonkeyScript</a></td>
72 <td>Constructor</td>
73 </tr>
74 <tr>
75 <td><a href="#GreaseMonkeyScript.__downloadIcon">__downloadIcon</a></td>
76 <td>Private slot to download the script icon.</td>
77 </tr>
78 <tr>
79 <td><a href="#GreaseMonkeyScript.__downloadRequires">__downloadRequires</a></td>
80 <td>Private method to download the required scripts.</td>
81 </tr>
82 <tr>
83 <td><a href="#GreaseMonkeyScript.__downloaderError">__downloaderError</a></td>
84 <td>Private slot to handle a downloader error.</td>
85 </tr>
86 <tr>
87 <td><a href="#GreaseMonkeyScript.__downloaderFinished">__downloaderFinished</a></td>
88 <td>Private slot to handle a finished download.</td>
89 </tr>
90 <tr>
91 <td><a href="#GreaseMonkeyScript.__iconDownloaded">__iconDownloaded</a></td>
92 <td>Private slot to handle a finished download of a script icon.</td>
93 </tr>
94 <tr>
95 <td><a href="#GreaseMonkeyScript.__parseScript">__parseScript</a></td>
96 <td>Private method to parse the given script and populate the data structure.</td>
97 </tr>
98 <tr>
99 <td><a href="#GreaseMonkeyScript.__reloadScript">__reloadScript</a></td>
100 <td>Private method to reload the script.</td>
101 </tr>
102 <tr>
103 <td><a href="#GreaseMonkeyScript.__requireDownloadError">__requireDownloadError</a></td>
104 <td>Private slot to handle a downloader error.</td>
105 </tr>
106 <tr>
107 <td><a href="#GreaseMonkeyScript.__requireDownloaded">__requireDownloaded</a></td>
108 <td>Private slot to handle a finished download of a required script.</td>
109 </tr>
110 <tr>
111 <td><a href="#GreaseMonkeyScript.__watchedFileChanged">__watchedFileChanged</a></td>
112 <td>Private slot handling changes of the script file.</td>
113 </tr>
114 <tr>
115 <td><a href="#GreaseMonkeyScript.description">description</a></td>
116 <td>Public method to get the description of the script.</td>
117 </tr>
118 <tr>
119 <td><a href="#GreaseMonkeyScript.downloadUrl">downloadUrl</a></td>
120 <td>Public method to get the download URL of the script.</td>
121 </tr>
122 <tr>
123 <td><a href="#GreaseMonkeyScript.exclude">exclude</a></td>
124 <td>Public method to get the list of excluded URLs.</td>
125 </tr>
126 <tr>
127 <td><a href="#GreaseMonkeyScript.fileName">fileName</a></td>
128 <td>Public method to get the path of the Javascript file.</td>
129 </tr>
130 <tr>
131 <td><a href="#GreaseMonkeyScript.fullName">fullName</a></td>
132 <td>Public method to get the full name of the script.</td>
133 </tr>
134 <tr>
135 <td><a href="#GreaseMonkeyScript.icon">icon</a></td>
136 <td>Public method to get the icon of the script.</td>
137 </tr>
138 <tr>
139 <td><a href="#GreaseMonkeyScript.iconUrl">iconUrl</a></td>
140 <td>Public method to get the icon URL of the script.</td>
141 </tr>
142 <tr>
143 <td><a href="#GreaseMonkeyScript.include">include</a></td>
144 <td>Public method to get the list of included URLs.</td>
145 </tr>
146 <tr>
147 <td><a href="#GreaseMonkeyScript.isEnabled">isEnabled</a></td>
148 <td>Public method to check, if the script is enabled.</td>
149 </tr>
150 <tr>
151 <td><a href="#GreaseMonkeyScript.isUpdating">isUpdating</a></td>
152 <td>Public method to get the updating flag.</td>
153 </tr>
154 <tr>
155 <td><a href="#GreaseMonkeyScript.isValid">isValid</a></td>
156 <td>Public method to check the validity of the script.</td>
157 </tr>
158 <tr>
159 <td><a href="#GreaseMonkeyScript.name">name</a></td>
160 <td>Public method to get the name of the script.</td>
161 </tr>
162 <tr>
163 <td><a href="#GreaseMonkeyScript.nameSpace">nameSpace</a></td>
164 <td>Public method to get the name space of the script.</td>
165 </tr>
166 <tr>
167 <td><a href="#GreaseMonkeyScript.noFrames">noFrames</a></td>
168 <td>Public method to get the noFrames flag.</td>
169 </tr>
170 <tr>
171 <td><a href="#GreaseMonkeyScript.require">require</a></td>
172 <td>Public method to get the list of required scripts.</td>
173 </tr>
174 <tr>
175 <td><a href="#GreaseMonkeyScript.setEnabled">setEnabled</a></td>
176 <td>Public method to enable a script.</td>
177 </tr>
178 <tr>
179 <td><a href="#GreaseMonkeyScript.startAt">startAt</a></td>
180 <td>Public method to get the start point of the script.</td>
181 </tr>
182 <tr>
183 <td><a href="#GreaseMonkeyScript.updateScript">updateScript</a></td>
184 <td>Public method to updated the script.</td>
185 </tr>
186 <tr>
187 <td><a href="#GreaseMonkeyScript.updateUrl">updateUrl</a></td>
188 <td>Public method to get the update URL of the script.</td>
189 </tr>
190 <tr>
191 <td><a href="#GreaseMonkeyScript.version">version</a></td>
192 <td>Public method to get the version of the script.</td>
193 </tr>
194 <tr>
195 <td><a href="#GreaseMonkeyScript.webScript">webScript</a></td>
196 <td>Public method to create a script object.</td>
197 </tr>
198 </table>
199 <h3>Static Methods</h3>
200
201 <table>
202 <tr><td>None</td></tr>
203 </table>
204
205 <a NAME="GreaseMonkeyScript.__init__" ID="GreaseMonkeyScript.__init__"></a>
206 <h4>GreaseMonkeyScript (Constructor)</h4>
207 <b>GreaseMonkeyScript</b>(<i>manager, path</i>)
208
209 <p>
210 Constructor
211 </p>
212 <dl>
213
214 <dt><i>manager</i></dt>
215 <dd>
216 reference to the manager object (GreaseMonkeyManager)
217 </dd>
218 <dt><i>path</i></dt>
219 <dd>
220 path of the Javascript file (string)
221 </dd>
222 </dl>
223 <a NAME="GreaseMonkeyScript.__downloadIcon" ID="GreaseMonkeyScript.__downloadIcon"></a>
224 <h4>GreaseMonkeyScript.__downloadIcon</h4>
225 <b>__downloadIcon</b>(<i></i>)
226
227 <p>
228 Private slot to download the script icon.
229 </p>
230 <a NAME="GreaseMonkeyScript.__downloadRequires" ID="GreaseMonkeyScript.__downloadRequires"></a>
231 <h4>GreaseMonkeyScript.__downloadRequires</h4>
232 <b>__downloadRequires</b>(<i></i>)
233
234 <p>
235 Private method to download the required scripts.
236 </p>
237 <a NAME="GreaseMonkeyScript.__downloaderError" ID="GreaseMonkeyScript.__downloaderError"></a>
238 <h4>GreaseMonkeyScript.__downloaderError</h4>
239 <b>__downloaderError</b>(<i>downloader</i>)
240
241 <p>
242 Private slot to handle a downloader error.
243 </p>
244 <dl>
245
246 <dt><i>downloader</i> (GreaseMonkeyDownloader)</dt>
247 <dd>
248 reference to the downloader object
249 </dd>
250 </dl>
251 <a NAME="GreaseMonkeyScript.__downloaderFinished" ID="GreaseMonkeyScript.__downloaderFinished"></a>
252 <h4>GreaseMonkeyScript.__downloaderFinished</h4>
253 <b>__downloaderFinished</b>(<i>downloader</i>)
254
255 <p>
256 Private slot to handle a finished download.
257 </p>
258 <dl>
259
260 <dt><i>downloader</i> (GreaseMonkeyDownloader)</dt>
261 <dd>
262 reference to the downloader object
263 </dd>
264 </dl>
265 <a NAME="GreaseMonkeyScript.__iconDownloaded" ID="GreaseMonkeyScript.__iconDownloaded"></a>
266 <h4>GreaseMonkeyScript.__iconDownloaded</h4>
267 <b>__iconDownloaded</b>(<i>reply</i>)
268
269 <p>
270 Private slot to handle a finished download of a script icon.
271 </p>
272 <dl>
273
274 <dt><i>reply</i> (QNetworkReply)</dt>
275 <dd>
276 reference to the network reply
277 </dd>
278 </dl>
279 <a NAME="GreaseMonkeyScript.__parseScript" ID="GreaseMonkeyScript.__parseScript"></a>
280 <h4>GreaseMonkeyScript.__parseScript</h4>
281 <b>__parseScript</b>(<i></i>)
282
283 <p>
284 Private method to parse the given script and populate the data
285 structure.
286 </p>
287 <a NAME="GreaseMonkeyScript.__reloadScript" ID="GreaseMonkeyScript.__reloadScript"></a>
288 <h4>GreaseMonkeyScript.__reloadScript</h4>
289 <b>__reloadScript</b>(<i></i>)
290
291 <p>
292 Private method to reload the script.
293 </p>
294 <a NAME="GreaseMonkeyScript.__requireDownloadError" ID="GreaseMonkeyScript.__requireDownloadError"></a>
295 <h4>GreaseMonkeyScript.__requireDownloadError</h4>
296 <b>__requireDownloadError</b>(<i>downloader</i>)
297
298 <p>
299 Private slot to handle a downloader error.
300 </p>
301 <dl>
302
303 <dt><i>downloader</i> (GreaseMonkeyDownloader)</dt>
304 <dd>
305 reference to the downloader object
306 </dd>
307 </dl>
308 <a NAME="GreaseMonkeyScript.__requireDownloaded" ID="GreaseMonkeyScript.__requireDownloaded"></a>
309 <h4>GreaseMonkeyScript.__requireDownloaded</h4>
310 <b>__requireDownloaded</b>(<i>downloader</i>)
311
312 <p>
313 Private slot to handle a finished download of a required script.
314 </p>
315 <dl>
316
317 <dt><i>downloader</i> (GreaseMonkeyDownloader)</dt>
318 <dd>
319 reference to the downloader object
320 </dd>
321 </dl>
322 <a NAME="GreaseMonkeyScript.__watchedFileChanged" ID="GreaseMonkeyScript.__watchedFileChanged"></a>
323 <h4>GreaseMonkeyScript.__watchedFileChanged</h4>
324 <b>__watchedFileChanged</b>(<i>fileName</i>)
325
326 <p>
327 Private slot handling changes of the script file.
328 </p>
329 <dl>
330
331 <dt><i>fileName</i> (str)</dt>
332 <dd>
333 path of the script file
334 </dd>
335 </dl>
336 <a NAME="GreaseMonkeyScript.description" ID="GreaseMonkeyScript.description"></a>
337 <h4>GreaseMonkeyScript.description</h4>
338 <b>description</b>(<i></i>)
339
340 <p>
341 Public method to get the description of the script.
342 </p>
343 <dl>
344 <dt>Return:</dt>
345 <dd>
346 description of the script (string)
347 </dd>
348 </dl>
349 <a NAME="GreaseMonkeyScript.downloadUrl" ID="GreaseMonkeyScript.downloadUrl"></a>
350 <h4>GreaseMonkeyScript.downloadUrl</h4>
351 <b>downloadUrl</b>(<i></i>)
352
353 <p>
354 Public method to get the download URL of the script.
355 </p>
356 <dl>
357 <dt>Return:</dt>
358 <dd>
359 download URL of the script (QUrl)
360 </dd>
361 </dl>
362 <a NAME="GreaseMonkeyScript.exclude" ID="GreaseMonkeyScript.exclude"></a>
363 <h4>GreaseMonkeyScript.exclude</h4>
364 <b>exclude</b>(<i></i>)
365
366 <p>
367 Public method to get the list of excluded URLs.
368 </p>
369 <dl>
370 <dt>Return:</dt>
371 <dd>
372 list of excluded URLs (list of strings)
373 </dd>
374 </dl>
375 <a NAME="GreaseMonkeyScript.fileName" ID="GreaseMonkeyScript.fileName"></a>
376 <h4>GreaseMonkeyScript.fileName</h4>
377 <b>fileName</b>(<i></i>)
378
379 <p>
380 Public method to get the path of the Javascript file.
381 </p>
382 <dl>
383 <dt>Return:</dt>
384 <dd>
385 path of the Javascript file (string)
386 </dd>
387 </dl>
388 <a NAME="GreaseMonkeyScript.fullName" ID="GreaseMonkeyScript.fullName"></a>
389 <h4>GreaseMonkeyScript.fullName</h4>
390 <b>fullName</b>(<i></i>)
391
392 <p>
393 Public method to get the full name of the script.
394 </p>
395 <dl>
396 <dt>Return:</dt>
397 <dd>
398 full name of the script (string)
399 </dd>
400 </dl>
401 <a NAME="GreaseMonkeyScript.icon" ID="GreaseMonkeyScript.icon"></a>
402 <h4>GreaseMonkeyScript.icon</h4>
403 <b>icon</b>(<i></i>)
404
405 <p>
406 Public method to get the icon of the script.
407 </p>
408 <dl>
409 <dt>Return:</dt>
410 <dd>
411 script icon
412 </dd>
413 </dl>
414 <dl>
415 <dt>Return Type:</dt>
416 <dd>
417 QIcon
418 </dd>
419 </dl>
420 <a NAME="GreaseMonkeyScript.iconUrl" ID="GreaseMonkeyScript.iconUrl"></a>
421 <h4>GreaseMonkeyScript.iconUrl</h4>
422 <b>iconUrl</b>(<i></i>)
423
424 <p>
425 Public method to get the icon URL of the script.
426 </p>
427 <dl>
428 <dt>Return:</dt>
429 <dd>
430 icon URL of the script (QUrl)
431 </dd>
432 </dl>
433 <a NAME="GreaseMonkeyScript.include" ID="GreaseMonkeyScript.include"></a>
434 <h4>GreaseMonkeyScript.include</h4>
435 <b>include</b>(<i></i>)
436
437 <p>
438 Public method to get the list of included URLs.
439 </p>
440 <dl>
441 <dt>Return:</dt>
442 <dd>
443 list of included URLs (list of strings)
444 </dd>
445 </dl>
446 <a NAME="GreaseMonkeyScript.isEnabled" ID="GreaseMonkeyScript.isEnabled"></a>
447 <h4>GreaseMonkeyScript.isEnabled</h4>
448 <b>isEnabled</b>(<i></i>)
449
450 <p>
451 Public method to check, if the script is enabled.
452 </p>
453 <dl>
454 <dt>Return:</dt>
455 <dd>
456 flag indicating an enabled state (boolean)
457 </dd>
458 </dl>
459 <a NAME="GreaseMonkeyScript.isUpdating" ID="GreaseMonkeyScript.isUpdating"></a>
460 <h4>GreaseMonkeyScript.isUpdating</h4>
461 <b>isUpdating</b>(<i></i>)
462
463 <p>
464 Public method to get the updating flag.
465 </p>
466 <dl>
467 <dt>Return:</dt>
468 <dd>
469 updating flag
470 </dd>
471 </dl>
472 <dl>
473 <dt>Return Type:</dt>
474 <dd>
475 bool
476 </dd>
477 </dl>
478 <a NAME="GreaseMonkeyScript.isValid" ID="GreaseMonkeyScript.isValid"></a>
479 <h4>GreaseMonkeyScript.isValid</h4>
480 <b>isValid</b>(<i></i>)
481
482 <p>
483 Public method to check the validity of the script.
484 </p>
485 <dl>
486 <dt>Return:</dt>
487 <dd>
488 flag indicating a valid script (boolean)
489 </dd>
490 </dl>
491 <a NAME="GreaseMonkeyScript.name" ID="GreaseMonkeyScript.name"></a>
492 <h4>GreaseMonkeyScript.name</h4>
493 <b>name</b>(<i></i>)
494
495 <p>
496 Public method to get the name of the script.
497 </p>
498 <dl>
499 <dt>Return:</dt>
500 <dd>
501 name of the script (string)
502 </dd>
503 </dl>
504 <a NAME="GreaseMonkeyScript.nameSpace" ID="GreaseMonkeyScript.nameSpace"></a>
505 <h4>GreaseMonkeyScript.nameSpace</h4>
506 <b>nameSpace</b>(<i></i>)
507
508 <p>
509 Public method to get the name space of the script.
510 </p>
511 <dl>
512 <dt>Return:</dt>
513 <dd>
514 name space of the script (string)
515 </dd>
516 </dl>
517 <a NAME="GreaseMonkeyScript.noFrames" ID="GreaseMonkeyScript.noFrames"></a>
518 <h4>GreaseMonkeyScript.noFrames</h4>
519 <b>noFrames</b>(<i></i>)
520
521 <p>
522 Public method to get the noFrames flag.
523 </p>
524 <dl>
525 <dt>Return:</dt>
526 <dd>
527 flag indicating to not run on sub frames
528 </dd>
529 </dl>
530 <dl>
531 <dt>Return Type:</dt>
532 <dd>
533 bool
534 </dd>
535 </dl>
536 <a NAME="GreaseMonkeyScript.require" ID="GreaseMonkeyScript.require"></a>
537 <h4>GreaseMonkeyScript.require</h4>
538 <b>require</b>(<i></i>)
539
540 <p>
541 Public method to get the list of required scripts.
542 </p>
543 <dl>
544 <dt>Return:</dt>
545 <dd>
546 list of required scripts (list of strings)
547 </dd>
548 </dl>
549 <a NAME="GreaseMonkeyScript.setEnabled" ID="GreaseMonkeyScript.setEnabled"></a>
550 <h4>GreaseMonkeyScript.setEnabled</h4>
551 <b>setEnabled</b>(<i>enable</i>)
552
553 <p>
554 Public method to enable a script.
555 </p>
556 <dl>
557
558 <dt><i>enable</i></dt>
559 <dd>
560 flag indicating the new enabled state (boolean)
561 </dd>
562 </dl>
563 <a NAME="GreaseMonkeyScript.startAt" ID="GreaseMonkeyScript.startAt"></a>
564 <h4>GreaseMonkeyScript.startAt</h4>
565 <b>startAt</b>(<i></i>)
566
567 <p>
568 Public method to get the start point of the script.
569 </p>
570 <dl>
571 <dt>Return:</dt>
572 <dd>
573 start point of the script (DocumentStart or DocumentEnd)
574 </dd>
575 </dl>
576 <a NAME="GreaseMonkeyScript.updateScript" ID="GreaseMonkeyScript.updateScript"></a>
577 <h4>GreaseMonkeyScript.updateScript</h4>
578 <b>updateScript</b>(<i></i>)
579
580 <p>
581 Public method to updated the script.
582 </p>
583 <a NAME="GreaseMonkeyScript.updateUrl" ID="GreaseMonkeyScript.updateUrl"></a>
584 <h4>GreaseMonkeyScript.updateUrl</h4>
585 <b>updateUrl</b>(<i></i>)
586
587 <p>
588 Public method to get the update URL of the script.
589 </p>
590 <dl>
591 <dt>Return:</dt>
592 <dd>
593 update URL of the script (QUrl)
594 </dd>
595 </dl>
596 <a NAME="GreaseMonkeyScript.version" ID="GreaseMonkeyScript.version"></a>
597 <h4>GreaseMonkeyScript.version</h4>
598 <b>version</b>(<i></i>)
599
600 <p>
601 Public method to get the version of the script.
602 </p>
603 <dl>
604 <dt>Return:</dt>
605 <dd>
606 version of the script (string)
607 </dd>
608 </dl>
609 <a NAME="GreaseMonkeyScript.webScript" ID="GreaseMonkeyScript.webScript"></a>
610 <h4>GreaseMonkeyScript.webScript</h4>
611 <b>webScript</b>(<i></i>)
612
613 <p>
614 Public method to create a script object.
615 </p>
616 <dl>
617 <dt>Return:</dt>
618 <dd>
619 prepared script object
620 </dd>
621 </dl>
622 <dl>
623 <dt>Return Type:</dt>
624 <dd>
625 QWebEngineScript
626 </dd>
627 </dl>
628 <div align="right"><a href="#top">Up</a></div>
629 <hr />
630 </body></html>

eric ide

mercurial