A tumblelog CMS built on AJAX, PHP and MySQL.

javascript.php 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php
  2. /*************************************************************************************
  3. * javascript.php
  4. * --------------
  5. * Author: Ben Keen (ben.keen@gmail.com)
  6. * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
  7. * Release Version: 1.0.7.21
  8. * Date Started: 2004/06/20
  9. *
  10. * JavaScript language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2004/11/27 (1.0.1)
  15. * - Added support for multiple object splitters
  16. * 2004/10/27 (1.0.0)
  17. * - First Release
  18. *
  19. * TODO (updated 2004/11/27)
  20. * -------------------------
  21. *
  22. *************************************************************************************
  23. *
  24. * This file is part of GeSHi.
  25. *
  26. * GeSHi is free software; you can redistribute it and/or modify
  27. * it under the terms of the GNU General Public License as published by
  28. * the Free Software Foundation; either version 2 of the License, or
  29. * (at your option) any later version.
  30. *
  31. * GeSHi is distributed in the hope that it will be useful,
  32. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. * GNU General Public License for more details.
  35. *
  36. * You should have received a copy of the GNU General Public License
  37. * along with GeSHi; if not, write to the Free Software
  38. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  39. *
  40. ************************************************************************************/
  41. $language_data = array (
  42. 'LANG_NAME' => 'Javascript',
  43. 'COMMENT_SINGLE' => array(1 => '//'),
  44. 'COMMENT_MULTI' => array('/*' => '*/'),
  45. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  46. 'QUOTEMARKS' => array("'", '"'),
  47. 'ESCAPE_CHAR' => '\\',
  48. 'KEYWORDS' => array(
  49. 1 => array(
  50. 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
  51. 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
  52. 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
  53. 'while', 'write', 'with'
  54. ),
  55. 2 => array(
  56. 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
  57. 'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
  58. 'protected', 'public', 'super', 'true', 'use', 'var'
  59. ),
  60. 3 => array(
  61. // common functions for Window object
  62. 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
  63. 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
  64. 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
  65. 'stop',
  66. )
  67. ),
  68. 'SYMBOLS' => array(
  69. '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
  70. ),
  71. 'CASE_SENSITIVE' => array(
  72. GESHI_COMMENTS => false,
  73. 1 => false,
  74. 2 => false,
  75. 3 => false
  76. ),
  77. 'STYLES' => array(
  78. 'KEYWORDS' => array(
  79. 1 => 'color: #000066; font-weight: bold;',
  80. 2 => 'color: #003366; font-weight: bold;',
  81. 3 => 'color: #000066;'
  82. ),
  83. 'COMMENTS' => array(
  84. 1 => 'color: #009900; font-style: italic;',
  85. 'MULTI' => 'color: #009900; font-style: italic;'
  86. ),
  87. 'ESCAPE_CHAR' => array(
  88. 0 => 'color: #000099; font-weight: bold;'
  89. ),
  90. 'BRACKETS' => array(
  91. 0 => 'color: #66cc66;'
  92. ),
  93. 'STRINGS' => array(
  94. 0 => 'color: #3366CC;'
  95. ),
  96. 'NUMBERS' => array(
  97. 0 => 'color: #CC0000;'
  98. ),
  99. 'METHODS' => array(
  100. 1 => 'color: #006600;'
  101. ),
  102. 'SYMBOLS' => array(
  103. 0 => 'color: #66cc66;'
  104. ),
  105. 'REGEXPS' => array(
  106. 0 => 'color: #0066FF;'
  107. ),
  108. 'SCRIPT' => array(
  109. 0 => '',
  110. 1 => '',
  111. 2 => '',
  112. 3 => ''
  113. )
  114. ),
  115. 'URLS' => array(
  116. 1 => '',
  117. 2 => '',
  118. 3 => ''
  119. ),
  120. 'OOLANG' => true,
  121. 'OBJECT_SPLITTERS' => array(
  122. 1 => '.'
  123. ),
  124. 'REGEXPS' => array(
  125. 0 => "/.*/([igm]*)?" // matches js reg exps
  126. ),
  127. 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
  128. 'SCRIPT_DELIMITERS' => array(
  129. 0 => array(
  130. '<script type="text/javascript">' => '</script>'
  131. ),
  132. 1 => array(
  133. '<script language="javascript">' => '</script>'
  134. )
  135. ),
  136. 'HIGHLIGHT_STRICT_BLOCK' => array(
  137. 0 => true,
  138. 1 => true
  139. )
  140. );
  141. ?>