ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
HFile_javascript.php
Go to the documentation of this file.
1<?php
2$BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3if (!isset ($BEAUT_PATH)) return;
4require_once("$BEAUT_PATH/Beautifier/HFile.php");
5 class HFile_javascript extends HFile{
6 function HFile_javascript(){
7 $this->HFile();
8/*************************************/
9// Beautifier Highlighting Configuration File
10// JavaScript
11/*************************************/
12// Flags
13
14$this->nocase = "0";
15$this->notrim = "0";
16$this->perl = "0";
17
18// Colours
19
20$this->colours = array("blue", "purple", "gray");
21$this->quotecolour = "blue";
22$this->blockcommentcolour = "green";
23$this->linecommentcolour = "green";
24
25// Indent Strings
26
27$this->indent = array("{");
28$this->unindent = array("}");
29
30// String characters and delimiters
31
32$this->stringchars = array();
33$this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "/", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
34$this->escchar = "";
35
36// Comment settings
37
38$this->linecommenton = array("//");
39$this->blockcommenton = array("/*");
40$this->blockcommentoff = array("*/");
41
42// Keywords (keyword mapping to colour number)
43
44$this->keywords = array(
45 "abstract" => "1",
46 "byte" => "1",
47 "case" => "1",
48 "catch" => "1",
49 "char" => "1",
50 "class" => "1",
51 "const" => "1",
52 "continue" => "1",
53 "default" => "1",
54 "delete" => "1",
55 "do" => "1",
56 "double" => "1",
57 "else" => "1",
58 "extends" => "1",
59 "false" => "1",
60 "final" => "1",
61 "finally" => "1",
62 "float" => "1",
63 "for" => "1",
64 "function" => "1",
65 "goto" => "1",
66 "if" => "1",
67 "implements" => "1",
68 "import" => "1",
69 "in" => "1",
70 "instanceof" => "1",
71 "int" => "1",
72 "interface" => "1",
73 "long" => "1",
74 "native" => "1",
75 "new" => "1",
76 "null" => "1",
77 "package" => "1",
78 "private" => "1",
79 "protected" => "1",
80 "public" => "1",
81 "reset" => "2",
82 "return" => "1",
83 "short" => "1",
84 "static" => "1",
85 "super" => "1",
86 "switch" => "1",
87 "synchronized" => "1",
88 "this" => "1",
89 "throw" => "1",
90 "transient" => "1",
91 "true" => "1",
92 "try" => "1",
93 "var" => "1",
94 "void" => "1",
95 "while" => "1",
96 "with" => "1",
97 "$n" => "2",
98 "above" => "2",
99 "abs" => "2",
100 "acos" => "2",
101 "action" => "2",
102 "activeElement" => "2",
103 "alert" => "2",
104 "alinkColor" => "2",
105 "all" => "2",
106 "altKey" => "2",
107 "anchor" => "2",
108 "anchors" => "2",
109 "appCodeName" => "2",
110 "applets" => "2",
111 "apply" => "2",
112 "appName" => "2",
113 "appVersion" => "2",
114 "arguments" => "2",
115 "arity" => "2",
116 "asin" => "2",
117 "assign" => "2",
118 "atan" => "2",
119 "atan2" => "2",
120 "atob" => "2",
121 "availHeight" => "2",
122 "availLeft" => "2",
123 "availTop" => "2",
124 "availWidth" => "2",
125 "back" => "2",
126 "background" => "2",
127 "below" => "2",
128 "bgColor" => "2",
129 "big" => "2",
130 "blink" => "2",
131 "blur" => "2",
132 "bold" => "2",
133 "border" => "2",
134 "borderWidths" => "2",
135 "bottom" => "2",
136 "btoa" => "2",
137 "button" => "2",
138 "call" => "2",
139 "callee" => "2",
140 "caller" => "2",
141 "cancelBubble" => "2",
142 "captureEvents" => "2",
143 "ceil" => "2",
144 "charAt" => "2",
145 "charCodeAt" => "2",
146 "charset" => "2",
147 "checked" => "2",
148 "children" => "2",
149 "classes" => "2",
150 "className" => "2",
151 "clear" => "2",
152 "clearInterval" => "2",
153 "clearTimeout" => "2",
154 "click" => "2",
155 "clientInformation" => "2",
156 "clientX" => "2",
157 "clientY" => "2",
158 "close" => "2",
159 "closed" => "2",
160 "colorDepth" => "2",
161 "compile" => "2",
162 "complete" => "2",
163 "concat" => "2",
164 "confirm" => "2",
165 "constructir" => "2",
166 "contains" => "2",
167 "contextual" => "2",
168 "cookie" => "2",
169 "cos" => "2",
170 "crypto" => "2",
171 "ctrlKey" => "2",
172 "current" => "2",
173 "data" => "2",
174 "defaultCharset" => "2",
175 "defaultChecked" => "2",
176 "defaultSelected" => "2",
177 "defaultStatus" => "2",
178 "defaultValue" => "2",
179 "description" => "2",
180 "disableExternalCapture" => "2",
181 "disablePrivilege" => "2",
182 "document" => "2",
183 "domain" => "2",
184 "E" => "2",
185 "element" => "2",
186 "FromPoint" => "2",
187 "elements" => "2",
188 "embeds" => "2",
189 "enabledPlugin" => "2",
190 "enableExternalCapture" => "2",
191 "enablePrivilege" => "2",
192 "encoding" => "2",
193 "escape" => "2",
194 "eval" => "2",
195 "event" => "2",
196 "exec" => "2",
197 "exp" => "2",
198 "expando" => "2",
199 "fgColor" => "2",
200 "fileName" => "2",
201 "find" => "2",
202 "fixed" => "2",
203 "floor" => "2",
204 "focus" => "2",
205 "fontColor" => "2",
206 "fontSize" => "2",
207 "form" => "2",
208 "forms" => "2",
209 "forward" => "2",
210 "frames" => "2",
211 "fromCharCode" => "2",
212 "fromElement" => "2",
213 "getAttribute" => "2",
214 "get" => "2",
215 "getClass" => "2",
216 "getDate" => "2",
217 "getDay" => "2",
218 "getFullYear" => "2",
219 "getHours" => "2",
220 "getMember" => "2",
221 "getMilliseconds" => "2",
222 "getMinutes" => "2",
223 "getMonth" => "2",
224 "getSeconds" => "2",
225 "getSelection" => "2",
226 "getSlot" => "2",
227 "getTime" => "2",
228 "getTimezoneOffset" => "2",
229 "getUTCDate" => "2",
230 "getUTCDay" => "2",
231 "getUTCFullYear" => "2",
232 "getUTCHours" => "2",
233 "getUTCMilliseconds" => "2",
234 "getUTCMinutes" => "2",
235 "getUTCMonth" => "2",
236 "getUTCSeconds" => "2",
237 "getWindow" => "2",
238 "getYear" => "2",
239 "global" => "2",
240 "go" => "2",
241 "HandleEvent" => "2",
242 "hash" => "2",
243 "hidden" => "2",
244 "history" => "2",
245 "home" => "2",
246 "host" => "2",
247 "hostName" => "2",
248 "href" => "2",
249 "hspace" => "2",
250 "id" => "2",
251 "ids" => "2",
252 "ignoreCase" => "2",
253 "images" => "2",
254 "index" => "2",
255 "indexOf" => "2",
256 "inner" => "2",
257 "Height" => "2",
258 "innerHTML" => "2",
259 "innerText" => "2",
260 "innerWidth" => "2",
261 "insertAdjacentHTML" => "2",
262 "insertAdjacentText" => "2",
263 "isFinite" => "2",
264 "isNAN" => "2",
265 "italics" => "2",
266 "java" => "2",
267 "javaEnabled" => "2",
268 "join" => "2",
269 "keyCode" => "2",
270 "lang" => "2",
271 "language" => "2",
272 "lastIndex" => "2",
273 "lastIndexOf" => "2",
274 "lastMatch" => "2",
275 "lastModified" => "2",
276 "lastParen" => "2",
277 "layers" => "2",
278 "layerX" => "2",
279 "layerY" => "2",
280 "left" => "2",
281 "leftContext" => "2",
282 "length" => "2",
283 "link" => "2",
284 "linkColor" => "2",
285 "Links" => "2",
286 "LN10" => "2",
287 "LN2" => "2",
288 "load" => "2",
289 "location" => "2",
290 "locationBar" => "2",
291 "log" => "2",
292 "LOG10E" => "2",
293 "LOG2E" => "2",
294 "lowsrc" => "2",
295 "margins" => "2",
296 "match" => "2",
297 "max" => "2",
298 "MAX_VALUE" => "2",
299 "menubar" => "2",
300 "method" => "2",
301 "mimeTypes" => "2",
302 "min" => "2",
303 "MIN_VALUE" => "2",
304 "modifiers" => "2",
305 "moveAbove" => "2",
306 "moveBelow" => "2",
307 "moveBy" => "2",
308 "moveTo" => "2",
309 "moveToAbsolute" => "2",
310 "multiline" => "2",
311 "name" => "2",
312 "NaN" => "2",
313 "navigate" => "2",
314 "navigator" => "2",
315 "NEGATIVE_INFINITY" => "2",
316 "netscape" => "2",
317 "next" => "2",
318 "offscreenBuffering" => "2",
319 "offset" => "2",
320 "offsetHeight" => "2",
321 "offsetLeft" => "2",
322 "offsetParent" => "2",
323 "offsetTop" => "2",
324 "offsetWidth" => "2",
325 "offsetX" => "2",
326 "offsetY" => "2",
327 "onabort" => "2",
328 "onblur" => "2",
329 "onchange" => "2",
330 "onclick" => "2",
331 "ondblclick" => "2",
332 "ondragdrop" => "2",
333 "onerror" => "2",
334 "onfocus" => "2",
335 "onHelp" => "2",
336 "onkeydown" => "2",
337 "onkeypress" => "2",
338 "onkeyup" => "2",
339 "onload" => "2",
340 "onmousedown" => "2",
341 "onmousemove" => "2",
342 "onmouseout" => "2",
343 "onmouseover" => "2",
344 "onmouseup" => "2",
345 "onmove" => "2",
346 "onreset" => "2",
347 "onresize" => "2",
348 "onsubmit" => "2",
349 "onunload" => "2",
350 "open" => "2",
351 "opener" => "2",
352 "options" => "2",
353 "outerHeight" => "2",
354 "outerHTML" => "2",
355 "outerText" => "2",
356 "outerWidth" => "2",
357 "paddings" => "2",
358 "pageX" => "2",
359 "pageXOffset" => "2",
360 "pageY" => "2",
361 "pageYOffset" => "2",
362 "parent" => "2",
363 "parentElement" => "2",
364 "parentLayer" => "2",
365 "parentWindow" => "2",
366 "parse" => "2",
367 "parseFloat" => "2",
368 "parseInt" => "2",
369 "pathname" => "2",
370 "personalbar" => "2",
371 "PI" => "2",
372 "pixelDepth" => "2",
373 "platform" => "2",
374 "plugins" => "2",
375 "pop" => "2",
376 "port" => "2",
377 "POSITIVE_INFINITY" => "2",
378 "pow" => "2",
379 "preference" => "2",
380 "previous" => "2",
381 "print" => "2",
382 "prompt" => "2",
383 "protocol" => "2",
384 "prototype" => "2",
385 "push" => "2",
386 "random" => "2",
387 "readyState" => "2",
388 "reason" => "2",
389 "referrer" => "2",
390 "refresh" => "2",
391 "releaseEvents" => "2",
392 "reload" => "2",
393 "removeAttribute" => "2",
394 "removeMember" => "2",
395 "replace" => "2",
396 "resizeBy" => "2",
397 "resizeTo" => "2",
398 "returnValue" => "2",
399 "reverse" => "2",
400 "right" => "2",
401 "rightcontext" => "2",
402 "screenX" => "2",
403 "screenY" => "2",
404 "scroll" => "2",
405 "scrollbars" => "2",
406 "scrollBy" => "2",
407 "scrollIntoView" => "2",
408 "scrollTo" => "2",
409 "search" => "2",
410 "select" => "2",
411 "selected" => "2",
412 "selectedIndex" => "2",
413 "self" => "2",
414 "setAttribute" => "2",
415 "setDay" => "2",
416 "setFullYear" => "2",
417 "setHotkeys" => "2",
418 "setHours" => "2",
419 "setInterval" => "2",
420 "setMember" => "2",
421 "setMilliseconds" => "2",
422 "setMinutes" => "2",
423 "setMonth" => "2",
424 "setResizable" => "2",
425 "setSeconds" => "2",
426 "setSlot" => "2",
427 "setTime" => "2",
428 "setTimeout" => "2",
429 "setUTCDate" => "2",
430 "setUTCFullYear" => "2",
431 "setUTCHours" => "2",
432 "setUTCMillseconds" => "2",
433 "setUTCMinutes" => "2",
434 "setUTCMonth" => "2",
435 "setUTCSeconds" => "2",
436 "setYear" => "2",
437 "setZOptions" => "2",
438 "shift" => "2",
439 "shiftKey" => "2",
440 "siblingAbove" => "2",
441 "siblingBelow" => "2",
442 "signText" => "2",
443 "sin" => "2",
444 "slice" => "2",
445 "smallsort" => "2",
446 "source" => "2",
447 "sourceIndex" => "2",
448 "splice" => "2",
449 "split" => "2",
450 "sqrt" => "2",
451 "SQRT1_2" => "2",
452 "SQRT2" => "2",
453 "src" => "2",
454 "srcElement" => "2",
455 "srcFilter" => "2",
456 "status" => "2",
457 "statusbar" => "2",
458 "stop" => "2",
459 "strike" => "2",
460 "style" => "2",
461 "sub" => "2",
462 "submit" => "2",
463 "substr" => "2",
464 "substring" => "2",
465 "suffixes" => "2",
466 "sun" => "2",
467 "sup" => "2",
468 "systemLanguage" => "2",
469 "tagName" => "2",
470 "tags" => "2",
471 "taint" => "2",
472 "taintEnabled" => "2",
473 "tan" => "2",
474 "target" => "2",
475 "test" => "2",
476 "text" => "2",
477 "title" => "2",
478 "toElement" => "2",
479 "toGMTString" => "2",
480 "toLocaleString" => "2",
481 "toLowerCase" => "2",
482 "toolbar" => "2",
483 "top" => "2",
484 "toString" => "2",
485 "toUpperCase" => "2",
486 "toUTCString" => "2",
487 "TYPE" => "2",
488 "type" => "2",
489 "typeOf" => "2",
490 "unescape" => "2",
491 "unshift" => "2",
492 "untaint" => "2",
493 "unwatch" => "2",
494 "userAgent" => "2",
495 "userLanguage" => "2",
496 "UTC" => "2",
497 "value" => "2",
498 "valueOf" => "2",
499 "visibility" => "2",
500 "vlinkColor" => "2",
501 "vspace" => "2",
502 "watch" => "2",
503 "which" => "2",
504 "width" => "2",
505 "window" => "2",
506 "write" => "2",
507 "writeln" => "2",
508 "x" => "2",
509 "y" => "2",
510 "zIndex" => "2",
511 "Anchor" => "3",
512 "Applet" => "3",
513 "Area" => "3",
514 "Arguments" => "3",
515 "Array" => "3",
516 "Boolean" => "3",
517 "Button" => "3",
518 "Checkbox" => "3",
519 "Crypto" => "3",
520 "Date" => "3",
521 "Document" => "3",
522 "Element" => "3",
523 "Event" => "3",
524 "FileUpload" => "3",
525 "Form" => "3",
526 "Frame" => "3",
527 "Function" => "3",
528 "Hidden" => "3",
529 "History" => "3",
530 "HTMLElement" => "3",
531 "Image" => "3",
532 "Infinity" => "3",
533 "Input" => "3",
534 "JavaArray" => "3",
535 "JavaClass" => "3",
536 "JavaObject" => "3",
537 "JavaPackage" => "3",
538 "JSObject" => "3",
539 "Layer" => "3",
540 "Link" => "3",
541 "Math" => "3",
542 "MimeType" => "3",
543 "Navigator" => "3",
544 "Number" => "3",
545 "Object" => "3",
546 "Option" => "3",
547 "Packages" => "3",
548 "Password" => "3",
549 "Plugin" => "3",
550 "PrivilegeManager" => "3",
551 "Random" => "3",
552 "RegExp" => "3",
553 "Screen" => "3",
554 "Select" => "3",
555 "String" => "3",
556 "Submit" => "3",
557 "Text" => "3",
558 "Textarea" => "3",
559 "URL" => "3",
560 "Window" => "3");
561
562// Special extensions
563
564// Each category can specify a PHP function that returns an altered
565// version of the keyword.
566
567
568
569$this->linkscripts = array(
570 "1" => "donothing",
571 "2" => "donothing",
572 "3" => "donothing");
573}
574
575
576function donothing($keywordin)
577{
578 return $keywordin;
579}
580
581}?>
$BEAUT_PATH