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

changeset 3673
e26d7d0c1088
equal deleted inserted replaced
3670:f0cb7579c0b4 3673:e26d7d0c1088
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Helpviewer.GreaseMonkey.GreaseMonkeyScript</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><a NAME="top" ID="top"></a>
22 <h1>eric6.Helpviewer.GreaseMonkey.GreaseMonkeyScript</h1>
23 <p>
24 Module implementing the GreaseMonkey script.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#GreaseMonkeyScript">GreaseMonkeyScript</a></td>
34 <td>Class implementing the GreaseMonkey script.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="GreaseMonkeyScript" ID="GreaseMonkeyScript"></a>
43 <h2>GreaseMonkeyScript</h2>
44 <p>
45 Class implementing the GreaseMonkey script.
46 </p>
47 <h3>Derived from</h3>
48 object
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>DocumentEnd</td></tr><tr><td>DocumentStart</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Methods</h3>
58 <table>
59 <tr>
60 <td><a href="#GreaseMonkeyScript.__init__">GreaseMonkeyScript</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#GreaseMonkeyScript.__parseScript">__parseScript</a></td>
64 <td>Private method to parse the given script and populate the data structure.</td>
65 </tr><tr>
66 <td><a href="#GreaseMonkeyScript.description">description</a></td>
67 <td>Public method to get the description of the script.</td>
68 </tr><tr>
69 <td><a href="#GreaseMonkeyScript.downloadUrl">downloadUrl</a></td>
70 <td>Public method to get the download URL of the script.</td>
71 </tr><tr>
72 <td><a href="#GreaseMonkeyScript.exclude">exclude</a></td>
73 <td>Public method to get the list of excluded URLs.</td>
74 </tr><tr>
75 <td><a href="#GreaseMonkeyScript.fileName">fileName</a></td>
76 <td>Public method to get the path of the Javascript file.</td>
77 </tr><tr>
78 <td><a href="#GreaseMonkeyScript.fullName">fullName</a></td>
79 <td>Public method to get the full name of the script.</td>
80 </tr><tr>
81 <td><a href="#GreaseMonkeyScript.include">include</a></td>
82 <td>Public method to get the list of included URLs.</td>
83 </tr><tr>
84 <td><a href="#GreaseMonkeyScript.isEnabled">isEnabled</a></td>
85 <td>Public method to check, if the script is enabled.</td>
86 </tr><tr>
87 <td><a href="#GreaseMonkeyScript.isValid">isValid</a></td>
88 <td>Public method to check the validity of the script.</td>
89 </tr><tr>
90 <td><a href="#GreaseMonkeyScript.match">match</a></td>
91 <td>Public method to check, if the script matches the given URL.</td>
92 </tr><tr>
93 <td><a href="#GreaseMonkeyScript.name">name</a></td>
94 <td>Public method to get the name of the script.</td>
95 </tr><tr>
96 <td><a href="#GreaseMonkeyScript.nameSpace">nameSpace</a></td>
97 <td>Public method to get the name space of the script.</td>
98 </tr><tr>
99 <td><a href="#GreaseMonkeyScript.script">script</a></td>
100 <td>Public method to get the Javascript source.</td>
101 </tr><tr>
102 <td><a href="#GreaseMonkeyScript.setEnabled">setEnabled</a></td>
103 <td>Public method to enable a script.</td>
104 </tr><tr>
105 <td><a href="#GreaseMonkeyScript.startAt">startAt</a></td>
106 <td>Public method to get the start point of the script.</td>
107 </tr><tr>
108 <td><a href="#GreaseMonkeyScript.version">version</a></td>
109 <td>Public method to get the version of the script.</td>
110 </tr>
111 </table>
112 <h3>Static Methods</h3>
113 <table>
114 <tr><td>None</td></tr>
115 </table>
116 <a NAME="GreaseMonkeyScript.__init__" ID="GreaseMonkeyScript.__init__"></a>
117 <h4>GreaseMonkeyScript (Constructor)</h4>
118 <b>GreaseMonkeyScript</b>(<i>manager, path</i>)
119 <p>
120 Constructor
121 </p><dl>
122 <dt><i>manager</i></dt>
123 <dd>
124 reference to the manager object (GreaseMonkeyManager)
125 </dd><dt><i>path</i></dt>
126 <dd>
127 path of the Javascript file (string)
128 </dd>
129 </dl><a NAME="GreaseMonkeyScript.__parseScript" ID="GreaseMonkeyScript.__parseScript"></a>
130 <h4>GreaseMonkeyScript.__parseScript</h4>
131 <b>__parseScript</b>(<i>path</i>)
132 <p>
133 Private method to parse the given script and populate the data
134 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><i>urlString</i></dt>
227 <dd>
228 URL (string)
229 </dd>
230 </dl><dl>
231 <dt>Returns:</dt>
232 <dd>
233 flag indicating a match (boolean)
234 </dd>
235 </dl><a NAME="GreaseMonkeyScript.name" ID="GreaseMonkeyScript.name"></a>
236 <h4>GreaseMonkeyScript.name</h4>
237 <b>name</b>(<i></i>)
238 <p>
239 Public method to get the name of the script.
240 </p><dl>
241 <dt>Returns:</dt>
242 <dd>
243 name of the script (string)
244 </dd>
245 </dl><a NAME="GreaseMonkeyScript.nameSpace" ID="GreaseMonkeyScript.nameSpace"></a>
246 <h4>GreaseMonkeyScript.nameSpace</h4>
247 <b>nameSpace</b>(<i></i>)
248 <p>
249 Public method to get the name space of the script.
250 </p><dl>
251 <dt>Returns:</dt>
252 <dd>
253 name space of the script (string)
254 </dd>
255 </dl><a NAME="GreaseMonkeyScript.script" ID="GreaseMonkeyScript.script"></a>
256 <h4>GreaseMonkeyScript.script</h4>
257 <b>script</b>(<i></i>)
258 <p>
259 Public method to get the Javascript source.
260 </p><dl>
261 <dt>Returns:</dt>
262 <dd>
263 Javascript source (string)
264 </dd>
265 </dl><a NAME="GreaseMonkeyScript.setEnabled" ID="GreaseMonkeyScript.setEnabled"></a>
266 <h4>GreaseMonkeyScript.setEnabled</h4>
267 <b>setEnabled</b>(<i>enable</i>)
268 <p>
269 Public method to enable a script.
270 </p><dl>
271 <dt><i>enable</i></dt>
272 <dd>
273 flag indicating the new enabled state (boolean)
274 </dd>
275 </dl><a NAME="GreaseMonkeyScript.startAt" ID="GreaseMonkeyScript.startAt"></a>
276 <h4>GreaseMonkeyScript.startAt</h4>
277 <b>startAt</b>(<i></i>)
278 <p>
279 Public method to get the start point of the script.
280 </p><dl>
281 <dt>Returns:</dt>
282 <dd>
283 start point of the script (DocumentStart or DocumentEnd)
284 </dd>
285 </dl><a NAME="GreaseMonkeyScript.version" ID="GreaseMonkeyScript.version"></a>
286 <h4>GreaseMonkeyScript.version</h4>
287 <b>version</b>(<i></i>)
288 <p>
289 Public method to get the version of the script.
290 </p><dl>
291 <dt>Returns:</dt>
292 <dd>
293 version of the script (string)
294 </dd>
295 </dl>
296 <div align="right"><a href="#top">Up</a></div>
297 <hr />
298 </body></html>

eric ide

mercurial