Documentation/Source/eric5.Helpviewer.GreaseMonkey.GreaseMonkeyScript.html

changeset 1953
26aa6fd94dc2
child 2367
78f6c8193d37
equal deleted inserted replaced
1952:af4103f0e93f 1953:26aa6fd94dc2
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric5.Helpviewer.GreaseMonkey.GreaseMonkeyScript</title>
6 <style>
7 body {
8 background: #EDECE6;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #85774A; }
14 h2 { color: white; background: #85774A; }
15 h3 { color: white; background: #9D936E; }
16 h4 { color: white; background: #9D936E; }
17
18 a { color: #BA6D36; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.Helpviewer.GreaseMonkey.GreaseMonkeyScript</h1>
24 <p>
25 Module implementing the GreaseMonkey script.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#GreaseMonkeyScript">GreaseMonkeyScript</a></td>
35 <td>Class implementing the GreaseMonkey script.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="GreaseMonkeyScript" ID="GreaseMonkeyScript"></a>
44 <h2>GreaseMonkeyScript</h2>
45 <p>
46 Class implementing the GreaseMonkey script.
47 </p>
48 <h3>Derived from</h3>
49 object
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>DocumentEnd</td></tr><tr><td>DocumentStart</td></tr>
53 </table>
54 <h3>Class Methods</h3>
55 <table>
56 <tr><td>None</td></tr>
57 </table>
58 <h3>Methods</h3>
59 <table>
60 <tr>
61 <td><a href="#GreaseMonkeyScript.__init__">GreaseMonkeyScript</a></td>
62 <td>Constructor</td>
63 </tr><tr>
64 <td><a href="#GreaseMonkeyScript.__parseScript">__parseScript</a></td>
65 <td>Private method to parse the given script and populate the data structure.</td>
66 </tr><tr>
67 <td><a href="#GreaseMonkeyScript.description">description</a></td>
68 <td>Public method to get the description of the script.</td>
69 </tr><tr>
70 <td><a href="#GreaseMonkeyScript.downloadUrl">downloadUrl</a></td>
71 <td>Public method to get the download URL of the script.</td>
72 </tr><tr>
73 <td><a href="#GreaseMonkeyScript.exclude">exclude</a></td>
74 <td>Public method to get the list of excluded URLs.</td>
75 </tr><tr>
76 <td><a href="#GreaseMonkeyScript.fileName">fileName</a></td>
77 <td>Public method to get the path of the Javascript file.</td>
78 </tr><tr>
79 <td><a href="#GreaseMonkeyScript.fullName">fullName</a></td>
80 <td>Public method to get the full name of the script.</td>
81 </tr><tr>
82 <td><a href="#GreaseMonkeyScript.include">include</a></td>
83 <td>Public method to get the list of included URLs.</td>
84 </tr><tr>
85 <td><a href="#GreaseMonkeyScript.isEnabled">isEnabled</a></td>
86 <td>Public method to check, if the script is enabled.</td>
87 </tr><tr>
88 <td><a href="#GreaseMonkeyScript.isValid">isValid</a></td>
89 <td>Public method to check the validity of the script.</td>
90 </tr><tr>
91 <td><a href="#GreaseMonkeyScript.match">match</a></td>
92 <td>Public method to check, if the script matches the given URL.</td>
93 </tr><tr>
94 <td><a href="#GreaseMonkeyScript.name">name</a></td>
95 <td>Public method to get the name of the script.</td>
96 </tr><tr>
97 <td><a href="#GreaseMonkeyScript.nameSpace">nameSpace</a></td>
98 <td>Public method to get the name space of the script.</td>
99 </tr><tr>
100 <td><a href="#GreaseMonkeyScript.script">script</a></td>
101 <td>Public method to get the Javascript source.</td>
102 </tr><tr>
103 <td><a href="#GreaseMonkeyScript.setEnabled">setEnabled</a></td>
104 <td>Public method to enable a script.</td>
105 </tr><tr>
106 <td><a href="#GreaseMonkeyScript.startAt">startAt</a></td>
107 <td>Public method to get the start point of the script.</td>
108 </tr><tr>
109 <td><a href="#GreaseMonkeyScript.version">version</a></td>
110 <td>Public method to get the version of the script.</td>
111 </tr>
112 </table>
113 <h3>Static Methods</h3>
114 <table>
115 <tr><td>None</td></tr>
116 </table>
117 <a NAME="GreaseMonkeyScript.__init__" ID="GreaseMonkeyScript.__init__"></a>
118 <h4>GreaseMonkeyScript (Constructor)</h4>
119 <b>GreaseMonkeyScript</b>(<i>manager, path</i>)
120 <p>
121 Constructor
122 </p><dl>
123 <dt><i>manager</i></dt>
124 <dd>
125 reference to the manager object (GreaseMonkeyManager)
126 </dd><dt><i>path</i></dt>
127 <dd>
128 path of the Javascript file (string)
129 </dd>
130 </dl><a NAME="GreaseMonkeyScript.__parseScript" ID="GreaseMonkeyScript.__parseScript"></a>
131 <h4>GreaseMonkeyScript.__parseScript</h4>
132 <b>__parseScript</b>(<i>path</i>)
133 <p>
134 Private method to parse the given script and populate the data structure.
135 </p><dl>
136 <dt><i>path</i></dt>
137 <dd>
138 path of the Javascript file (string)
139 </dd>
140 </dl><a NAME="GreaseMonkeyScript.description" ID="GreaseMonkeyScript.description"></a>
141 <h4>GreaseMonkeyScript.description</h4>
142 <b>description</b>(<i></i>)
143 <p>
144 Public method to get the description of the script.
145 </p><dl>
146 <dt>Returns:</dt>
147 <dd>
148 description of the script (string)
149 </dd>
150 </dl><a NAME="GreaseMonkeyScript.downloadUrl" ID="GreaseMonkeyScript.downloadUrl"></a>
151 <h4>GreaseMonkeyScript.downloadUrl</h4>
152 <b>downloadUrl</b>(<i></i>)
153 <p>
154 Public method to get the download URL of the script.
155 </p><dl>
156 <dt>Returns:</dt>
157 <dd>
158 download URL of the script (QUrl)
159 </dd>
160 </dl><a NAME="GreaseMonkeyScript.exclude" ID="GreaseMonkeyScript.exclude"></a>
161 <h4>GreaseMonkeyScript.exclude</h4>
162 <b>exclude</b>(<i></i>)
163 <p>
164 Public method to get the list of excluded URLs.
165 </p><dl>
166 <dt>Returns:</dt>
167 <dd>
168 list of excluded URLs (list of strings)
169 </dd>
170 </dl><a NAME="GreaseMonkeyScript.fileName" ID="GreaseMonkeyScript.fileName"></a>
171 <h4>GreaseMonkeyScript.fileName</h4>
172 <b>fileName</b>(<i></i>)
173 <p>
174 Public method to get the path of the Javascript file.
175 </p><dl>
176 <dt>Returns:</dt>
177 <dd>
178 path path of the Javascript file (string)
179 </dd>
180 </dl><a NAME="GreaseMonkeyScript.fullName" ID="GreaseMonkeyScript.fullName"></a>
181 <h4>GreaseMonkeyScript.fullName</h4>
182 <b>fullName</b>(<i></i>)
183 <p>
184 Public method to get the full name of the script.
185 </p><dl>
186 <dt>Returns:</dt>
187 <dd>
188 full name of the script (string)
189 </dd>
190 </dl><a NAME="GreaseMonkeyScript.include" ID="GreaseMonkeyScript.include"></a>
191 <h4>GreaseMonkeyScript.include</h4>
192 <b>include</b>(<i></i>)
193 <p>
194 Public method to get the list of included URLs.
195 </p><dl>
196 <dt>Returns:</dt>
197 <dd>
198 list of included URLs (list of strings)
199 </dd>
200 </dl><a NAME="GreaseMonkeyScript.isEnabled" ID="GreaseMonkeyScript.isEnabled"></a>
201 <h4>GreaseMonkeyScript.isEnabled</h4>
202 <b>isEnabled</b>(<i></i>)
203 <p>
204 Public method to check, if the script is enabled.
205 </p><dl>
206 <dt>Returns:</dt>
207 <dd>
208 flag indicating an enabled state (boolean)
209 </dd>
210 </dl><a NAME="GreaseMonkeyScript.isValid" ID="GreaseMonkeyScript.isValid"></a>
211 <h4>GreaseMonkeyScript.isValid</h4>
212 <b>isValid</b>(<i></i>)
213 <p>
214 Public method to check the validity of the script.
215 </p><dl>
216 <dt>Returns:</dt>
217 <dd>
218 flag indicating a valid script (boolean)
219 </dd>
220 </dl><a NAME="GreaseMonkeyScript.match" ID="GreaseMonkeyScript.match"></a>
221 <h4>GreaseMonkeyScript.match</h4>
222 <b>match</b>(<i>urlString</i>)
223 <p>
224 Public method to check, if the script matches the given URL.
225 </p><dl>
226 <dt>Returns:</dt>
227 <dd>
228 flag indicating a match (boolean)
229 </dd>
230 </dl><a NAME="GreaseMonkeyScript.name" ID="GreaseMonkeyScript.name"></a>
231 <h4>GreaseMonkeyScript.name</h4>
232 <b>name</b>(<i></i>)
233 <p>
234 Public method to get the name of the script.
235 </p><dl>
236 <dt>Returns:</dt>
237 <dd>
238 name of the script (string)
239 </dd>
240 </dl><a NAME="GreaseMonkeyScript.nameSpace" ID="GreaseMonkeyScript.nameSpace"></a>
241 <h4>GreaseMonkeyScript.nameSpace</h4>
242 <b>nameSpace</b>(<i></i>)
243 <p>
244 Public method to get the name space of the script.
245 </p><dl>
246 <dt>Returns:</dt>
247 <dd>
248 name space of the script (string)
249 </dd>
250 </dl><a NAME="GreaseMonkeyScript.script" ID="GreaseMonkeyScript.script"></a>
251 <h4>GreaseMonkeyScript.script</h4>
252 <b>script</b>(<i></i>)
253 <p>
254 Public method to get the Javascript source.
255 </p><dl>
256 <dt>Returns:</dt>
257 <dd>
258 Javascript source (string)
259 </dd>
260 </dl><a NAME="GreaseMonkeyScript.setEnabled" ID="GreaseMonkeyScript.setEnabled"></a>
261 <h4>GreaseMonkeyScript.setEnabled</h4>
262 <b>setEnabled</b>(<i>enable</i>)
263 <p>
264 Public method to enable a script.
265 </p><dl>
266 <dt><i>enable</i></dt>
267 <dd>
268 flag indicating the new enabled state (boolean)
269 </dd>
270 </dl><a NAME="GreaseMonkeyScript.startAt" ID="GreaseMonkeyScript.startAt"></a>
271 <h4>GreaseMonkeyScript.startAt</h4>
272 <b>startAt</b>(<i></i>)
273 <p>
274 Public method to get the start point of the script.
275 </p><dl>
276 <dt>Returns:</dt>
277 <dd>
278 start point of the script (DocumentStart or DocumentEnd)
279 </dd>
280 </dl><a NAME="GreaseMonkeyScript.version" ID="GreaseMonkeyScript.version"></a>
281 <h4>GreaseMonkeyScript.version</h4>
282 <b>version</b>(<i></i>)
283 <p>
284 Public method to get the version of the script.
285 </p><dl>
286 <dt>Returns:</dt>
287 <dd>
288 version of the script (string)
289 </dd>
290 </dl>
291 <div align="right"><a href="#top">Up</a></div>
292 <hr />
293 </body></html>

eric ide

mercurial