envjs19 0.3.8.20101029121421

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. data/.jslintrbrc +30 -0
  2. data/.project +17 -0
  3. data/CHANGELOG.rdoc +57 -0
  4. data/DTD/xhtml-lat1.ent +196 -0
  5. data/DTD/xhtml-special.ent +80 -0
  6. data/DTD/xhtml-symbol.ent +237 -0
  7. data/DTD/xhtml.soc +14 -0
  8. data/DTD/xhtml1-frameset.dtd +1235 -0
  9. data/DTD/xhtml1-strict.dtd +978 -0
  10. data/DTD/xhtml1-transitional.dtd +1201 -0
  11. data/DTD/xhtml1.dcl +192 -0
  12. data/Makefile +7 -0
  13. data/Manifest.txt +280 -0
  14. data/README.rdoc +65 -0
  15. data/Rakefile +196 -0
  16. data/Wakefile +11 -0
  17. data/bin/envjsrb +257 -0
  18. data/build.properties +9 -0
  19. data/build.xml +247 -0
  20. data/gm/jquery.js +6002 -0
  21. data/gm/mainx.js +2648 -0
  22. data/gm/sensx.js +135 -0
  23. data/gm/t.js +6 -0
  24. data/gm/x.html +76 -0
  25. data/htmlparser/BrowserTreeBuilder.java +456 -0
  26. data/htmlparser/README +34 -0
  27. data/htmlparser/build.sh +38 -0
  28. data/jsl/jsl +0 -0
  29. data/jsl/jsl.default.conf +129 -0
  30. data/jsl/jsl.exe +0 -0
  31. data/lib/envjs.rb +35 -0
  32. data/lib/envjs/event_loop.js +206 -0
  33. data/lib/envjs/net.rb +3 -0
  34. data/lib/envjs/net/cgi.rb +94 -0
  35. data/lib/envjs/net/file.rb +69 -0
  36. data/lib/envjs/options.rb +11 -0
  37. data/lib/envjs/runtime.rb +346 -0
  38. data/lib/envjs/tempfile.rb +24 -0
  39. data/licenses/GPL-LICENSE.txt +278 -0
  40. data/licenses/MIT-LICENSE.txt +20 -0
  41. data/src/base64.js +80 -0
  42. data/src/build.js +6 -0
  43. data/src/cruft/bad.html +24 -0
  44. data/src/cruft/dom.js +606 -0
  45. data/src/cruft/element.js +297 -0
  46. data/src/cruft/good.html +30 -0
  47. data/src/cruft/good.js +32 -0
  48. data/src/cruft/internal.js +81 -0
  49. data/src/cruft/parser.js +458 -0
  50. data/src/css/properties.js +293 -0
  51. data/src/css/rule.js +22 -0
  52. data/src/css/sizzle.js +717 -0
  53. data/src/css/stylesheet.js +52 -0
  54. data/src/dom/attr.js +55 -0
  55. data/src/dom/cdatasection.js +31 -0
  56. data/src/dom/characterdata.js +119 -0
  57. data/src/dom/comment.js +30 -0
  58. data/src/dom/doctype.js +9 -0
  59. data/src/dom/document.js +1023 -0
  60. data/src/dom/dom.js +134 -0
  61. data/src/dom/element.js +217 -0
  62. data/src/dom/entities.js +273 -0
  63. data/src/dom/exception.js +28 -0
  64. data/src/dom/fragment.js +37 -0
  65. data/src/dom/implementation.js +140 -0
  66. data/src/dom/instruction.js +51 -0
  67. data/src/dom/namednodemap.js +374 -0
  68. data/src/dom/namespace.js +50 -0
  69. data/src/dom/node.js +618 -0
  70. data/src/dom/nodelist.js +195 -0
  71. data/src/dom/parser.js +1207 -0
  72. data/src/dom/text.js +73 -0
  73. data/src/event/event.js +47 -0
  74. data/src/event/mouseevent.js +4 -0
  75. data/src/event/uievent.js +8 -0
  76. data/src/html/a.js +110 -0
  77. data/src/html/anchor.js +80 -0
  78. data/src/html/area.js +57 -0
  79. data/src/html/base.js +26 -0
  80. data/src/html/blockquote-q.js +19 -0
  81. data/src/html/body.js +19 -0
  82. data/src/html/button.js +21 -0
  83. data/src/html/canvas.js +14 -0
  84. data/src/html/col-colgroup.js +49 -0
  85. data/src/html/collection.js +72 -0
  86. data/src/html/cookie.js +153 -0
  87. data/src/html/del-ins.js +25 -0
  88. data/src/html/div.js +28 -0
  89. data/src/html/document.js +364 -0
  90. data/src/html/element.js +382 -0
  91. data/src/html/fieldset.js +19 -0
  92. data/src/html/form.js +484 -0
  93. data/src/html/frame.js +89 -0
  94. data/src/html/frameset.js +25 -0
  95. data/src/html/head.js +44 -0
  96. data/src/html/html.js +0 -0
  97. data/src/html/htmlparser.js +340 -0
  98. data/src/html/iframe.js +26 -0
  99. data/src/html/image.js +0 -0
  100. data/src/html/img.js +62 -0
  101. data/src/html/input-elements.js +307 -0
  102. data/src/html/input.js +65 -0
  103. data/src/html/label.js +26 -0
  104. data/src/html/legend.js +19 -0
  105. data/src/html/link.js +82 -0
  106. data/src/html/map.js +22 -0
  107. data/src/html/meta.js +37 -0
  108. data/src/html/object.js +89 -0
  109. data/src/html/optgroup.js +25 -0
  110. data/src/html/option.js +103 -0
  111. data/src/html/param.js +38 -0
  112. data/src/html/script.js +122 -0
  113. data/src/html/select.js +132 -0
  114. data/src/html/style.js +31 -0
  115. data/src/html/table.js +199 -0
  116. data/src/html/tbody-thead-tfoot.js +92 -0
  117. data/src/html/td-th.js +18 -0
  118. data/src/html/textarea.js +31 -0
  119. data/src/html/title.js +20 -0
  120. data/src/html/tr.js +114 -0
  121. data/src/intro.js +141 -0
  122. data/src/outro.js +70 -0
  123. data/src/parser/html5.detailed.js +10762 -0
  124. data/src/parser/html5.min.js +503 -0
  125. data/src/parser/html5.pretty.js +10815 -0
  126. data/src/parser/intro.js +42 -0
  127. data/src/parser/outro.js +9 -0
  128. data/src/platform/core.js +323 -0
  129. data/src/platform/johnson.js +484 -0
  130. data/src/platform/rhino.js +327 -0
  131. data/src/platform/static/intro.js +41 -0
  132. data/src/platform/static/outro.js +30 -0
  133. data/src/profile/aop.js +238 -0
  134. data/src/profile/profile.js +402 -0
  135. data/src/serializer/xml.js +21 -0
  136. data/src/svg/animatedstring.js +25 -0
  137. data/src/svg/document.js +25 -0
  138. data/src/svg/element.js +22 -0
  139. data/src/svg/locatable.js +17 -0
  140. data/src/svg/rect.js +18 -0
  141. data/src/svg/rectelement.js +24 -0
  142. data/src/svg/stylable.js +49 -0
  143. data/src/svg/svgelement.js +22 -0
  144. data/src/svg/transformable.js +15 -0
  145. data/src/window/css.js +15 -0
  146. data/src/window/dialog.js +16 -0
  147. data/src/window/document.js +28 -0
  148. data/src/window/event.js +265 -0
  149. data/src/window/history.js +62 -0
  150. data/src/window/location.js +156 -0
  151. data/src/window/navigator.js +48 -0
  152. data/src/window/screen.js +53 -0
  153. data/src/window/timer.js +21 -0
  154. data/src/window/window.js +284 -0
  155. data/src/window/xhr.js +135 -0
  156. data/src/xpath/expression.js +49 -0
  157. data/src/xpath/implementation.js +2505 -0
  158. data/src/xpath/result.js +67 -0
  159. data/src/xpath/util.js +551 -0
  160. data/src/xpath/xmltoken.js +149 -0
  161. data/src/xslt/COPYING +34 -0
  162. data/src/xslt/ajaxslt-0.8.1/AUTHORS +1 -0
  163. data/src/xslt/ajaxslt-0.8.1/ChangeLog +136 -0
  164. data/src/xslt/ajaxslt-0.8.1/Makefile +49 -0
  165. data/src/xslt/ajaxslt-0.8.1/README +102 -0
  166. data/src/xslt/ajaxslt-0.8.1/TODO +15 -0
  167. data/src/xslt/ajaxslt-0.8.1/dom.js +566 -0
  168. data/src/xslt/ajaxslt-0.8.1/dom_unittest.html +24 -0
  169. data/src/xslt/ajaxslt-0.8.1/dom_unittest.js +131 -0
  170. data/src/xslt/ajaxslt-0.8.1/simplelog.js +79 -0
  171. data/src/xslt/ajaxslt-0.8.1/test/xpath.html +18 -0
  172. data/src/xslt/ajaxslt-0.8.1/test/xpath_script.js +45 -0
  173. data/src/xslt/ajaxslt-0.8.1/test/xslt.html +58 -0
  174. data/src/xslt/ajaxslt-0.8.1/test/xslt_script.js +33 -0
  175. data/src/xslt/ajaxslt-0.8.1/unittestsuite.html +26 -0
  176. data/src/xslt/ajaxslt-0.8.1/xmltoken.js +149 -0
  177. data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.html +18 -0
  178. data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.js +811 -0
  179. data/src/xslt/ajaxslt-0.8.1/xpath_unittest.html +39 -0
  180. data/src/xslt/ajaxslt-0.8.1/xpath_unittest.js +557 -0
  181. data/src/xslt/ajaxslt-0.8.1/xpathdebug.js +234 -0
  182. data/src/xslt/ajaxslt-0.8.1/xslt_unittest.html +138 -0
  183. data/src/xslt/ajaxslt-0.8.1/xslt_unittest.js +68 -0
  184. data/src/xslt/implementation.js +625 -0
  185. data/src/xslt/processor.js +37 -0
  186. data/src/xslt/util.js +449 -0
  187. data/test/base64.js +80 -0
  188. data/test/call-load-test.js +15 -0
  189. data/test/data.js +45 -0
  190. data/test/debug.js +53 -0
  191. data/test/firebug/errorIcon.png +0 -0
  192. data/test/firebug/firebug.css +209 -0
  193. data/test/firebug/firebug.html +23 -0
  194. data/test/firebug/firebug.js +672 -0
  195. data/test/firebug/firebugx.js +10 -0
  196. data/test/firebug/infoIcon.png +0 -0
  197. data/test/firebug/warningIcon.png +0 -0
  198. data/test/fixtures/html/events.html +171 -0
  199. data/test/fixtures/html/iframe1.html +46 -0
  200. data/test/fixtures/html/iframe1a.html +46 -0
  201. data/test/fixtures/html/iframe2.html +45 -0
  202. data/test/fixtures/html/iframe3.html +28 -0
  203. data/test/fixtures/html/iframeN.html +57 -0
  204. data/test/fixtures/html/malformed.html +181 -0
  205. data/test/fixtures/html/scope.html +81 -0
  206. data/test/fixtures/html/trivial.html +19 -0
  207. data/test/fixtures/html/with_js.html +26 -0
  208. data/test/fixtures/images/icon-blue.png +0 -0
  209. data/test/fixtures/js/external_script.js +1 -0
  210. data/test/fixtures/js/script.js +1 -0
  211. data/test/fixtures/js/script_error.js +2 -0
  212. data/test/foo.html +8 -0
  213. data/test/foo.js +40 -0
  214. data/test/html/events.html +171 -0
  215. data/test/html/iframe1.html +46 -0
  216. data/test/html/iframe1a.html +46 -0
  217. data/test/html/iframe2.html +45 -0
  218. data/test/html/iframe3.html +30 -0
  219. data/test/html/iframeN.html +57 -0
  220. data/test/html/malformed.html +181 -0
  221. data/test/html/scope.html +87 -0
  222. data/test/html/script.js +1 -0
  223. data/test/html/trivial.html +19 -0
  224. data/test/html/with_js.html +26 -0
  225. data/test/index.html +328 -0
  226. data/test/java-prototype.js +9 -0
  227. data/test/jquery.js +6002 -0
  228. data/test/primary-tests.js +26 -0
  229. data/test/prototype-test.js +13 -0
  230. data/test/qunit.js +61 -0
  231. data/test/qunit/qunit/qunit.css +17 -0
  232. data/test/qunit/qunit/qunit.js +997 -0
  233. data/test/scope.html +19 -0
  234. data/test/scope.rb +24 -0
  235. data/test/smp/dmathieu/index.html +8 -0
  236. data/test/specs/dist/env.spec.js +1534 -0
  237. data/test/specs/envjs.spec.css +46 -0
  238. data/test/specs/parser/html.js +31 -0
  239. data/test/specs/parser/spec.html +40 -0
  240. data/test/specs/parser/xml.js +31 -0
  241. data/test/specs/qunit.bdd.js +210 -0
  242. data/test/specs/qunit.css +17 -0
  243. data/test/specs/qunit.js +997 -0
  244. data/test/specs/template/spec-0.js +31 -0
  245. data/test/specs/template/spec-1.js +31 -0
  246. data/test/specs/template/spec.html +40 -0
  247. data/test/specs/window/css.js +23 -0
  248. data/test/specs/window/dialog.js +25 -0
  249. data/test/specs/window/document.js +23 -0
  250. data/test/specs/window/event.js +25 -0
  251. data/test/specs/window/history.js +34 -0
  252. data/test/specs/window/location.js +34 -0
  253. data/test/specs/window/navigator.js +71 -0
  254. data/test/specs/window/screen.js +42 -0
  255. data/test/specs/window/spec.html +48 -0
  256. data/test/specs/window/timer.js +26 -0
  257. data/test/specs/window/window.js +53 -0
  258. data/test/specs/xhr/spec.html +47 -0
  259. data/test/specs/xhr/xhr.js +31 -0
  260. data/test/test.js +10 -0
  261. data/test/unit/dom.js +44 -0
  262. data/test/unit/elementmembers.js +92 -0
  263. data/test/unit/events.js +195 -0
  264. data/test/unit/fixtures/external_script.js +1 -0
  265. data/test/unit/form.js +40 -0
  266. data/test/unit/iframe.js +234 -0
  267. data/test/unit/insertion.js +23 -0
  268. data/test/unit/multi-window.js +212 -0
  269. data/test/unit/nu.validator.js +34 -0
  270. data/test/unit/onload.js +90 -0
  271. data/test/unit/parser.js +122 -0
  272. data/test/unit/prototypecompat.js +22 -0
  273. data/test/unit/proxy.js +6 -0
  274. data/test/unit/scope.js +209 -0
  275. data/test/unit/timer.js +115 -0
  276. data/test/unit/window.js +57 -0
  277. data/test/x.js +1 -0
  278. data/test/y.js +1 -0
  279. metadata +367 -0
data/test/base64.js ADDED
@@ -0,0 +1,80 @@
1
+ // This code was written by Tyler Akins and has been placed in the
2
+ // public domain. It would be nice if you left this header intact.
3
+ // Base64 code from Tyler Akins -- http://rumkin.com
4
+
5
+ var Base64 = (function () {
6
+ var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
7
+
8
+ var obj = {
9
+ /**
10
+ * Encodes a string in base64
11
+ * @param {String} input The string to encode in base64.
12
+ */
13
+ encode: function (input) {
14
+ var output = "";
15
+ var chr1, chr2, chr3;
16
+ var enc1, enc2, enc3, enc4;
17
+ var i = 0;
18
+
19
+ do {
20
+ chr1 = input.charCodeAt(i++);
21
+ chr2 = input.charCodeAt(i++);
22
+ chr3 = input.charCodeAt(i++);
23
+
24
+ enc1 = chr1 >> 2;
25
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
26
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
27
+ enc4 = chr3 & 63;
28
+
29
+ if (isNaN(chr2)) {
30
+ enc3 = enc4 = 64;
31
+ } else if (isNaN(chr3)) {
32
+ enc4 = 64;
33
+ }
34
+
35
+ output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) +
36
+ keyStr.charAt(enc3) + keyStr.charAt(enc4);
37
+ } while (i < input.length);
38
+
39
+ return output;
40
+ },
41
+
42
+ /**
43
+ * Decodes a base64 string.
44
+ * @param {String} input The string to decode.
45
+ */
46
+ decode: function (input) {
47
+ var output = "";
48
+ var chr1, chr2, chr3;
49
+ var enc1, enc2, enc3, enc4;
50
+ var i = 0;
51
+
52
+ // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
53
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
54
+
55
+ do {
56
+ enc1 = keyStr.indexOf(input.charAt(i++));
57
+ enc2 = keyStr.indexOf(input.charAt(i++));
58
+ enc3 = keyStr.indexOf(input.charAt(i++));
59
+ enc4 = keyStr.indexOf(input.charAt(i++));
60
+
61
+ chr1 = (enc1 << 2) | (enc2 >> 4);
62
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
63
+ chr3 = ((enc3 & 3) << 6) | enc4;
64
+
65
+ output = output + String.fromCharCode(chr1);
66
+
67
+ if (enc3 != 64) {
68
+ output = output + String.fromCharCode(chr2);
69
+ }
70
+ if (enc4 != 64) {
71
+ output = output + String.fromCharCode(chr3);
72
+ }
73
+ } while (i < input.length);
74
+
75
+ return output;
76
+ }
77
+ };
78
+
79
+ return obj;
80
+ })();
@@ -0,0 +1,15 @@
1
+ load("test/qunit.js");
2
+
3
+ Envjs("test/index.html", {});
4
+
5
+ test("'index.html' loaded correctly via 'Envjs()' call", function(){
6
+ expect(1);
7
+ try{ ok(document.getElementById('body').id == "body",
8
+ "'index.html' page content available");
9
+ }catch(e){print(e);}
10
+ });
11
+
12
+ test("window.location= following Envjs() initialization flagged as error",
13
+ function(){
14
+ expect(0);
15
+ });
data/test/data.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env envjsrb
2
+ load('base64.js');
3
+ inner = "<head><title>Hello, World from a data uri!</title></head><body></body>";
4
+ doc = "<html>"+inner+"</html>";
5
+ url_escaped = "data:text/html,"+escape(doc);
6
+ base64 = "data:text/html;base64,"+Base64.encode(doc);
7
+ debug(url_escaped);
8
+ window.location = "about:blank";
9
+ Envjs.wait();
10
+ window.location = url_escaped;
11
+ Envjs.wait();
12
+ debug(window.document.documentElement.innerHTML);
13
+ if(window.document.documentElement.innerHTML != inner){
14
+ debug(window.document.documentElement.innerHTML);
15
+ debug(inner);
16
+ throw new Error(window.document.documentElement.innerHTML);
17
+ }
18
+ debug(base64);
19
+ window.location = "about:blank";
20
+ Envjs.wait();
21
+ window.location = base64;
22
+ Envjs.wait();
23
+ debug(window.document.documentElement.innerHTML);
24
+ if(window.document.documentElement.innerHTML != inner){
25
+ throw new Error("b"+window.document.documentElement.innerHTML);
26
+ }
27
+ window.location = "about:blank";
28
+ Envjs.wait();
29
+ window.location = "data:,"+escape("Hello, World from a data uri!");
30
+ Envjs.wait();
31
+ debug(window.location+"");
32
+ debug(window.document.documentElement.innerHTML);
33
+ inner = "<head><title></title></head><body>Hello, World from a data uri!</body>";
34
+ if(window.document.documentElement.innerHTML != inner){
35
+ throw new Error("c"+window.document.documentElement.innerHTML);
36
+ }
37
+
38
+ /* not implemented yet ...
39
+ w = open("about:blank");
40
+ w.foo = 10;
41
+ debug(w.foo);
42
+ uri = "data:text/javascript;base64,"+"foo = 20;";
43
+ w.load(uri);
44
+ debug(w.foo);
45
+ */
data/test/debug.js ADDED
@@ -0,0 +1,53 @@
1
+ // Init
2
+ load("src/env.js");
3
+ load("src/htmlparser.js");
4
+
5
+ window.location = "test/index.html";
6
+
7
+ window.onload = function(){
8
+ load("test/testrunner.js");
9
+ load("test/jquery.js");
10
+
11
+ var depth = 0;
12
+
13
+ function indent(){
14
+ var str = "";
15
+ for ( var i = 0; i < depth; i++ ) {
16
+ str += " ";
17
+ }
18
+ return str;
19
+ }
20
+
21
+ function dump(name, args, ret){
22
+ print(name + ": " + Array.prototype.slice.call(args) + " - Return: " + ret);
23
+ }
24
+
25
+ for ( var method in jQuery.fn ) (function(method){ if ( method != "init" ) {
26
+ var old = jQuery.fn[method];
27
+ jQuery.fn[method] = function(){
28
+ print(indent() + method + ": " + Array.prototype.slice.call(arguments));
29
+ depth++;
30
+ var ret = old.apply(this, arguments);
31
+ depth--;
32
+ print(indent() + method + ": Return " + ret);
33
+ return ret;
34
+ };
35
+ } })(method);
36
+
37
+ for ( var method in jQuery ) (function(method){ if ( method != "prototype" && method != "fn" ) {
38
+ var old = jQuery[method];
39
+ jQuery[method] = function(){
40
+ print(indent() + "$." + method + ": " + Array.prototype.slice.call(arguments));
41
+ depth++;
42
+ var ret = old.apply(this, arguments);
43
+ depth--;
44
+ print(indent() + "$." + method + ": Return " + ret);
45
+ return ret;
46
+ };
47
+ } })(method);
48
+
49
+ jQuery.prototype.toString = DOMNodeList.prototype.toString;
50
+ Function.prototype.toString = function(){ return "function()"; };
51
+
52
+ print("Ready.");
53
+ };
Binary file
@@ -0,0 +1,209 @@
1
+
2
+ html, body {
3
+ margin: 0;
4
+ background: #FFFFFF;
5
+ font-family: Lucida Grande, Tahoma, sans-serif;
6
+ font-size: 11px;
7
+ overflow: hidden;
8
+ }
9
+
10
+ a {
11
+ text-decoration: none;
12
+ }
13
+
14
+ a:hover {
15
+ text-decoration: underline;
16
+ }
17
+
18
+ .toolbar {
19
+ height: 14px;
20
+ border-top: 1px solid ThreeDHighlight;
21
+ border-bottom: 1px solid ThreeDShadow;
22
+ padding: 2px 6px;
23
+ background: ThreeDFace;
24
+ }
25
+
26
+ .toolbarRight {
27
+ position: absolute;
28
+ top: 4px;
29
+ right: 6px;
30
+ }
31
+
32
+ #log {
33
+ overflow: auto;
34
+ position: absolute;
35
+ left: 0;
36
+ width: 100%;
37
+ }
38
+
39
+ #commandLine {
40
+ position: absolute;
41
+ bottom: 0;
42
+ left: 0;
43
+ width: 100%;
44
+ height: 18px;
45
+ border: none;
46
+ border-top: 1px solid ThreeDShadow;
47
+ }
48
+
49
+ /************************************************************************************************/
50
+
51
+ .logRow {
52
+ position: relative;
53
+ border-bottom: 1px solid #D7D7D7;
54
+ padding: 2px 4px 1px 6px;
55
+ background-color: #FFFFFF;
56
+ }
57
+
58
+ .logRow-command {
59
+ font-family: Monaco, monospace;
60
+ color: blue;
61
+ }
62
+
63
+ .objectBox-null {
64
+ padding: 0 2px;
65
+ border: 1px solid #666666;
66
+ background-color: #888888;
67
+ color: #FFFFFF;
68
+ }
69
+
70
+ .objectBox-string {
71
+ font-family: Monaco, monospace;
72
+ color: red;
73
+ white-space: pre;
74
+ }
75
+
76
+ .objectBox-number {
77
+ color: #000088;
78
+ }
79
+
80
+ .objectBox-function {
81
+ font-family: Monaco, monospace;
82
+ color: DarkGreen;
83
+ }
84
+
85
+ .objectBox-object {
86
+ color: DarkGreen;
87
+ font-weight: bold;
88
+ }
89
+
90
+ /************************************************************************************************/
91
+
92
+ .logRow-info,
93
+ .logRow-error,
94
+ .logRow-warning {
95
+ background: #FFFFFF no-repeat 2px 2px;
96
+ padding-left: 20px;
97
+ padding-bottom: 3px;
98
+ }
99
+
100
+ .logRow-info {
101
+ background-image: url(infoIcon.png);
102
+ }
103
+
104
+ .logRow-warning {
105
+ background-color: cyan;
106
+ background-image: url(warningIcon.png);
107
+ }
108
+
109
+ .logRow-error {
110
+ background-color: LightYellow;
111
+ background-image: url(errorIcon.png);
112
+ }
113
+
114
+ .errorMessage {
115
+ vertical-align: top;
116
+ color: #FF0000;
117
+ }
118
+
119
+ .objectBox-sourceLink {
120
+ position: absolute;
121
+ right: 4px;
122
+ top: 2px;
123
+ padding-left: 8px;
124
+ font-family: Lucida Grande, sans-serif;
125
+ font-weight: bold;
126
+ color: #0000FF;
127
+ }
128
+
129
+ /************************************************************************************************/
130
+
131
+ .logRow-group {
132
+ background: #EEEEEE;
133
+ border-bottom: none;
134
+ }
135
+
136
+ .logGroup {
137
+ background: #EEEEEE;
138
+ }
139
+
140
+ .logGroupBox {
141
+ margin-left: 24px;
142
+ border-top: 1px solid #D7D7D7;
143
+ border-left: 1px solid #D7D7D7;
144
+ }
145
+
146
+ /************************************************************************************************/
147
+
148
+ .selectorTag,
149
+ .selectorId,
150
+ .selectorClass {
151
+ font-family: Monaco, monospace;
152
+ font-weight: normal;
153
+ }
154
+
155
+ .selectorTag {
156
+ color: #0000FF;
157
+ }
158
+
159
+ .selectorId {
160
+ color: DarkBlue;
161
+ }
162
+
163
+ .selectorClass {
164
+ color: red;
165
+ }
166
+
167
+ /************************************************************************************************/
168
+
169
+ .objectBox-element {
170
+ font-family: Monaco, monospace;
171
+ color: #000088;
172
+ }
173
+
174
+ .nodeChildren {
175
+ margin-left: 16px;
176
+ }
177
+
178
+ .nodeTag {
179
+ color: blue;
180
+ }
181
+
182
+ .nodeValue {
183
+ color: #FF0000;
184
+ font-weight: normal;
185
+ }
186
+
187
+ .nodeText,
188
+ .nodeComment {
189
+ margin: 0 2px;
190
+ vertical-align: top;
191
+ }
192
+
193
+ .nodeText {
194
+ color: #333333;
195
+ }
196
+
197
+ .nodeComment {
198
+ color: DarkGreen;
199
+ }
200
+
201
+ /************************************************************************************************/
202
+
203
+ .propertyNameCell {
204
+ vertical-align: top;
205
+ }
206
+
207
+ .propertyName {
208
+ font-weight: bold;
209
+ }
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml">
5
+
6
+ <head>
7
+ <title>Firebug</title>
8
+ <link rel="stylesheet" type="text/css" href="firebug.css">
9
+ </head>
10
+
11
+ <body>
12
+ <div id="toolbar" class="toolbar">
13
+ <a href="#" onclick="parent.console.clear()">Clear</a>
14
+ <span class="toolbarRight">
15
+ <a href="#" onclick="parent.console.close()">Close</a>
16
+ </span>
17
+ </div>
18
+ <div id="log"></div>
19
+ <input type="text" id="commandLine">
20
+
21
+ <script>parent.onFirebugReady(document);</script>
22
+ </body>
23
+ </html>
@@ -0,0 +1,672 @@
1
+
2
+ if (!("console" in window) || !("firebug" in console)) {
3
+ (function()
4
+ {
5
+ window.console =
6
+ {
7
+ log: function()
8
+ {
9
+ logFormatted(arguments, "");
10
+ },
11
+
12
+ debug: function()
13
+ {
14
+ logFormatted(arguments, "debug");
15
+ },
16
+
17
+ info: function()
18
+ {
19
+ logFormatted(arguments, "info");
20
+ },
21
+
22
+ warn: function()
23
+ {
24
+ logFormatted(arguments, "warning");
25
+ },
26
+
27
+ error: function()
28
+ {
29
+ logFormatted(arguments, "error");
30
+ },
31
+
32
+ assert: function(truth, message)
33
+ {
34
+ if (!truth)
35
+ {
36
+ var args = [];
37
+ for (var i = 1; i < arguments.length; ++i)
38
+ args.push(arguments[i]);
39
+
40
+ logFormatted(args.length ? args : ["Assertion Failure"], "error");
41
+ throw message ? message : "Assertion Failure";
42
+ }
43
+ },
44
+
45
+ dir: function(object)
46
+ {
47
+ var html = [];
48
+
49
+ var pairs = [];
50
+ for (var name in object)
51
+ {
52
+ try
53
+ {
54
+ pairs.push([name, object[name]]);
55
+ }
56
+ catch (exc)
57
+ {
58
+ }
59
+ }
60
+
61
+ pairs.sort(function(a, b) { return a[0] < b[0] ? -1 : 1; });
62
+
63
+ html.push('<table>');
64
+ for (var i = 0; i < pairs.length; ++i)
65
+ {
66
+ var name = pairs[i][0], value = pairs[i][1];
67
+
68
+ html.push('<tr>',
69
+ '<td class="propertyNameCell"><span class="propertyName">',
70
+ escapeHTML(name), '</span></td>', '<td><span class="propertyValue">');
71
+ appendObject(value, html);
72
+ html.push('</span></td></tr>');
73
+ }
74
+ html.push('</table>');
75
+
76
+ logRow(html, "dir");
77
+ },
78
+
79
+ dirxml: function(node)
80
+ {
81
+ var html = [];
82
+
83
+ appendNode(node, html);
84
+ logRow(html, "dirxml");
85
+ },
86
+
87
+ group: function()
88
+ {
89
+ logRow(arguments, "group", pushGroup);
90
+ },
91
+
92
+ groupEnd: function()
93
+ {
94
+ logRow(arguments, "", popGroup);
95
+ },
96
+
97
+ time: function(name)
98
+ {
99
+ timeMap[name] = (new Date()).getTime();
100
+ },
101
+
102
+ timeEnd: function(name)
103
+ {
104
+ if (name in timeMap)
105
+ {
106
+ var delta = (new Date()).getTime() - timeMap[name];
107
+ logFormatted([name+ ":", delta+"ms"]);
108
+ delete timeMap[name];
109
+ }
110
+ },
111
+
112
+ count: function()
113
+ {
114
+ this.warn(["count() not supported."]);
115
+ },
116
+
117
+ trace: function()
118
+ {
119
+ this.warn(["trace() not supported."]);
120
+ },
121
+
122
+ profile: function()
123
+ {
124
+ this.warn(["profile() not supported."]);
125
+ },
126
+
127
+ profileEnd: function()
128
+ {
129
+ },
130
+
131
+ clear: function()
132
+ {
133
+ consoleBody.innerHTML = "";
134
+ },
135
+
136
+ open: function()
137
+ {
138
+ toggleConsole(true);
139
+ },
140
+
141
+ close: function()
142
+ {
143
+ if (frameVisible)
144
+ toggleConsole();
145
+ }
146
+ };
147
+
148
+ // ********************************************************************************************
149
+
150
+ var consoleFrame = null;
151
+ var consoleBody = null;
152
+ var commandLine = null;
153
+
154
+ var frameVisible = false;
155
+ var messageQueue = [];
156
+ var groupStack = [];
157
+ var timeMap = {};
158
+
159
+ var clPrefix = ">>> ";
160
+
161
+ var isFirefox = navigator.userAgent.indexOf("Firefox") != -1;
162
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
163
+ var isOpera = navigator.userAgent.indexOf("Opera") != -1;
164
+ var isSafari = navigator.userAgent.indexOf("AppleWebKit") != -1;
165
+
166
+ // ********************************************************************************************
167
+
168
+ function toggleConsole(forceOpen)
169
+ {
170
+ frameVisible = forceOpen || !frameVisible;
171
+ if (consoleFrame)
172
+ consoleFrame.style.visibility = frameVisible ? "visible" : "hidden";
173
+ else
174
+ waitForBody();
175
+ }
176
+
177
+ function focusCommandLine()
178
+ {
179
+ toggleConsole(true);
180
+ if (commandLine)
181
+ commandLine.focus();
182
+ }
183
+
184
+ function waitForBody()
185
+ {
186
+ if (document.body)
187
+ createFrame();
188
+ else
189
+ setTimeout(waitForBody, 200);
190
+ }
191
+
192
+ function createFrame()
193
+ {
194
+ if (consoleFrame)
195
+ return;
196
+
197
+ window.onFirebugReady = function(doc)
198
+ {
199
+ window.onFirebugReady = null;
200
+
201
+ var toolbar = doc.getElementById("toolbar");
202
+ toolbar.onmousedown = onSplitterMouseDown;
203
+
204
+ commandLine = doc.getElementById("commandLine");
205
+ addEvent(commandLine, "keydown", onCommandLineKeyDown);
206
+
207
+ addEvent(doc, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
208
+
209
+ consoleBody = doc.getElementById("log");
210
+ layout();
211
+ flush();
212
+ }
213
+
214
+ var baseURL = getFirebugURL();
215
+
216
+ consoleFrame = document.createElement("iframe");
217
+ consoleFrame.setAttribute("src", baseURL+"/firebug.html");
218
+ consoleFrame.setAttribute("frameBorder", "0");
219
+ consoleFrame.style.visibility = (frameVisible ? "visible" : "hidden");
220
+ consoleFrame.style.zIndex = "2147483647";
221
+ consoleFrame.style.position = "fixed";
222
+ consoleFrame.style.width = "100%";
223
+ consoleFrame.style.left = "0";
224
+ consoleFrame.style.bottom = "0";
225
+ consoleFrame.style.height = "200px";
226
+ document.body.appendChild(consoleFrame);
227
+ }
228
+
229
+ function getFirebugURL()
230
+ {
231
+ var scripts = document.getElementsByTagName("script");
232
+ for (var i = 0; i < scripts.length; ++i)
233
+ {
234
+ if (scripts[i].src.indexOf("firebug.js") != -1)
235
+ {
236
+ var lastSlash = scripts[i].src.lastIndexOf("/");
237
+ return scripts[i].src.substr(0, lastSlash);
238
+ }
239
+ }
240
+ }
241
+
242
+ function evalCommandLine()
243
+ {
244
+ var text = commandLine.value;
245
+ commandLine.value = "";
246
+
247
+ logRow([clPrefix, text], "command");
248
+
249
+ var value;
250
+ try
251
+ {
252
+ value = eval(text);
253
+ }
254
+ catch (exc)
255
+ {
256
+ }
257
+
258
+ console.log(value);
259
+ }
260
+
261
+ function layout()
262
+ {
263
+ var toolbar = consoleBody.ownerDocument.getElementById("toolbar");
264
+ var height = consoleFrame.offsetHeight - (toolbar.offsetHeight + commandLine.offsetHeight);
265
+ consoleBody.style.top = toolbar.offsetHeight + "px";
266
+ consoleBody.style.height = height + "px";
267
+
268
+ commandLine.style.top = (consoleFrame.offsetHeight - commandLine.offsetHeight) + "px";
269
+ }
270
+
271
+ function logRow(message, className, handler)
272
+ {
273
+ if (consoleBody)
274
+ writeMessage(message, className, handler);
275
+ else
276
+ {
277
+ messageQueue.push([message, className, handler]);
278
+ waitForBody();
279
+ }
280
+ }
281
+
282
+ function flush()
283
+ {
284
+ var queue = messageQueue;
285
+ messageQueue = [];
286
+
287
+ for (var i = 0; i < queue.length; ++i)
288
+ writeMessage(queue[i][0], queue[i][1], queue[i][2]);
289
+ }
290
+
291
+ function writeMessage(message, className, handler)
292
+ {
293
+ var isScrolledToBottom =
294
+ consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight;
295
+
296
+ if (!handler)
297
+ handler = writeRow;
298
+
299
+ handler(message, className);
300
+
301
+ if (isScrolledToBottom)
302
+ consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight;
303
+ }
304
+
305
+ function appendRow(row)
306
+ {
307
+ var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody;
308
+ container.appendChild(row);
309
+ }
310
+
311
+ function writeRow(message, className)
312
+ {
313
+ var row = consoleBody.ownerDocument.createElement("div");
314
+ row.className = "logRow" + (className ? " logRow-"+className : "");
315
+ row.innerHTML = message.join("");
316
+ appendRow(row);
317
+ }
318
+
319
+ function pushGroup(message, className)
320
+ {
321
+ logFormatted(message, className);
322
+
323
+ var groupRow = consoleBody.ownerDocument.createElement("div");
324
+ groupRow.className = "logGroup";
325
+ var groupRowBox = consoleBody.ownerDocument.createElement("div");
326
+ groupRowBox.className = "logGroupBox";
327
+ groupRow.appendChild(groupRowBox);
328
+ appendRow(groupRowBox);
329
+ groupStack.push(groupRowBox);
330
+ }
331
+
332
+ function popGroup()
333
+ {
334
+ groupStack.pop();
335
+ }
336
+
337
+ // ********************************************************************************************
338
+
339
+ function logFormatted(objects, className)
340
+ {
341
+ var html = [];
342
+
343
+ var format = objects[0];
344
+ var objIndex = 0;
345
+
346
+ if (typeof(format) != "string")
347
+ {
348
+ format = "";
349
+ objIndex = -1;
350
+ }
351
+
352
+ var parts = parseFormat(format);
353
+ for (var i = 0; i < parts.length; ++i)
354
+ {
355
+ var part = parts[i];
356
+ if (part && typeof(part) == "object")
357
+ {
358
+ var object = objects[++objIndex];
359
+ part.appender(object, html);
360
+ }
361
+ else
362
+ appendText(part, html);
363
+ }
364
+
365
+ for (var i = objIndex+1; i < objects.length; ++i)
366
+ {
367
+ appendText(" ", html);
368
+
369
+ var object = objects[i];
370
+ if (typeof(object) == "string")
371
+ appendText(object, html);
372
+ else
373
+ appendObject(object, html);
374
+ }
375
+
376
+ logRow(html, className);
377
+ }
378
+
379
+ function parseFormat(format)
380
+ {
381
+ var parts = [];
382
+
383
+ var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
384
+ var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
385
+
386
+ for (var m = reg.exec(format); m; m = reg.exec(format))
387
+ {
388
+ var type = m[8] ? m[8] : m[5];
389
+ var appender = type in appenderMap ? appenderMap[type] : appendObject;
390
+ var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
391
+
392
+ parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
393
+ parts.push({appender: appender, precision: precision});
394
+
395
+ format = format.substr(m.index+m[0].length);
396
+ }
397
+
398
+ parts.push(format);
399
+
400
+ return parts;
401
+ }
402
+
403
+ function escapeHTML(value)
404
+ {
405
+ function replaceChars(ch)
406
+ {
407
+ switch (ch)
408
+ {
409
+ case "<":
410
+ return "&lt;";
411
+ case ">":
412
+ return "&gt;";
413
+ case "&":
414
+ return "&amp;";
415
+ case "'":
416
+ return "&#39;";
417
+ case '"':
418
+ return "&quot;";
419
+ }
420
+ return "?";
421
+ };
422
+ return String(value).replace(/[<>&"']/g, replaceChars);
423
+ }
424
+
425
+ function objectToString(object)
426
+ {
427
+ try
428
+ {
429
+ return object+"";
430
+ }
431
+ catch (exc)
432
+ {
433
+ return null;
434
+ }
435
+ }
436
+
437
+ // ********************************************************************************************
438
+
439
+ function appendText(object, html)
440
+ {
441
+ html.push(escapeHTML(objectToString(object)));
442
+ }
443
+
444
+ function appendNull(object, html)
445
+ {
446
+ html.push('<span class="objectBox-null">', escapeHTML(objectToString(object)), '</span>');
447
+ }
448
+
449
+ function appendString(object, html)
450
+ {
451
+ html.push('<span class="objectBox-string">&quot;', escapeHTML(objectToString(object)),
452
+ '&quot;</span>');
453
+ }
454
+
455
+ function appendInteger(object, html)
456
+ {
457
+ html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
458
+ }
459
+
460
+ function appendFloat(object, html)
461
+ {
462
+ html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
463
+ }
464
+
465
+ function appendFunction(object, html)
466
+ {
467
+ var reName = /function ?(.*?)\(/;
468
+ var m = reName.exec(objectToString(object));
469
+ var name = m ? m[1] : "function";
470
+ html.push('<span class="objectBox-function">', escapeHTML(name), '()</span>');
471
+ }
472
+
473
+ function appendObject(object, html)
474
+ {
475
+ try
476
+ {
477
+ if (object == undefined)
478
+ appendNull("undefined", html);
479
+ else if (object == null)
480
+ appendNull("null", html);
481
+ else if (typeof object == "string")
482
+ appendString(object, html);
483
+ else if (typeof object == "number")
484
+ appendInteger(object, html);
485
+ else if (typeof object == "function")
486
+ appendFunction(object, html);
487
+ else if (object.nodeType == 1)
488
+ appendSelector(object, html);
489
+ else if (typeof object == "object")
490
+ appendObjectFormatted(object, html);
491
+ else
492
+ appendText(object, html);
493
+ }
494
+ catch (exc)
495
+ {
496
+ }
497
+ }
498
+
499
+ function appendObjectFormatted(object, html)
500
+ {
501
+ var text = objectToString(object);
502
+ var reObject = /\[object (.*?)\]/;
503
+
504
+ var m = reObject.exec(text);
505
+ html.push('<span class="objectBox-object">', m ? m[1] : text, '</span>')
506
+ }
507
+
508
+ function appendSelector(object, html)
509
+ {
510
+ html.push('<span class="objectBox-selector">');
511
+
512
+ html.push('<span class="selectorTag">', escapeHTML(object.nodeName.toLowerCase()), '</span>');
513
+ if (object.id)
514
+ html.push('<span class="selectorId">#', escapeHTML(object.id), '</span>');
515
+ if (object.className)
516
+ html.push('<span class="selectorClass">.', escapeHTML(object.className), '</span>');
517
+
518
+ html.push('</span>');
519
+ }
520
+
521
+ function appendNode(node, html)
522
+ {
523
+ if (node.nodeType == 1)
524
+ {
525
+ html.push(
526
+ '<div class="objectBox-element">',
527
+ '&lt;<span class="nodeTag">', node.nodeName.toLowerCase(), '</span>');
528
+
529
+ for (var i = 0; i < node.attributes.length; ++i)
530
+ {
531
+ var attr = node.attributes[i];
532
+ if (!attr.specified)
533
+ continue;
534
+
535
+ html.push('&nbsp;<span class="nodeName">', attr.nodeName.toLowerCase(),
536
+ '</span>=&quot;<span class="nodeValue">', escapeHTML(attr.nodeValue),
537
+ '</span>&quot;')
538
+ }
539
+
540
+ if (node.firstChild)
541
+ {
542
+ html.push('&gt;</div><div class="nodeChildren">');
543
+
544
+ for (var child = node.firstChild; child; child = child.nextSibling)
545
+ appendNode(child, html);
546
+
547
+ html.push('</div><div class="objectBox-element">&lt;/<span class="nodeTag">',
548
+ node.nodeName.toLowerCase(), '&gt;</span></div>');
549
+ }
550
+ else
551
+ html.push('/&gt;</div>');
552
+ }
553
+ else if (node.nodeType == 3)
554
+ {
555
+ html.push('<div class="nodeText">', escapeHTML(node.nodeValue),
556
+ '</div>');
557
+ }
558
+ }
559
+
560
+ // ********************************************************************************************
561
+
562
+ function addEvent(object, name, handler)
563
+ {
564
+ if (document.all)
565
+ object.attachEvent("on"+name, handler);
566
+ else
567
+ object.addEventListener(name, handler, false);
568
+ }
569
+
570
+ function removeEvent(object, name, handler)
571
+ {
572
+ if (document.all)
573
+ object.detachEvent("on"+name, handler);
574
+ else
575
+ object.removeEventListener(name, handler, false);
576
+ }
577
+
578
+ function cancelEvent(event)
579
+ {
580
+ if (document.all)
581
+ event.cancelBubble = true;
582
+ else
583
+ event.stopPropagation();
584
+ }
585
+
586
+ function onError(msg, href, lineNo)
587
+ {
588
+ var html = [];
589
+
590
+ var lastSlash = href.lastIndexOf("/");
591
+ var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1);
592
+
593
+ html.push(
594
+ '<span class="errorMessage">', msg, '</span>',
595
+ '<div class="objectBox-sourceLink">', fileName, ' (line ', lineNo, ')</div>'
596
+ );
597
+
598
+ logRow(html, "error");
599
+ };
600
+
601
+ function onKeyDown(event)
602
+ {
603
+ if (event.keyCode == 123)
604
+ toggleConsole();
605
+ else if ((event.keyCode == 108 || event.keyCode == 76) && event.shiftKey
606
+ && (event.metaKey || event.ctrlKey))
607
+ focusCommandLine();
608
+ else
609
+ return;
610
+
611
+ cancelEvent(event);
612
+ }
613
+
614
+ function onSplitterMouseDown(event)
615
+ {
616
+ if (isSafari || isOpera)
617
+ return;
618
+
619
+ addEvent(document, "mousemove", onSplitterMouseMove);
620
+ addEvent(document, "mouseup", onSplitterMouseUp);
621
+
622
+ for (var i = 0; i < frames.length; ++i)
623
+ {
624
+ addEvent(frames[i].document, "mousemove", onSplitterMouseMove);
625
+ addEvent(frames[i].document, "mouseup", onSplitterMouseUp);
626
+ }
627
+ }
628
+
629
+ function onSplitterMouseMove(event)
630
+ {
631
+ var win = document.all
632
+ ? event.srcElement.ownerDocument.parentWindow
633
+ : event.target.ownerDocument.defaultView;
634
+
635
+ var clientY = event.clientY;
636
+ if (win != win.parent)
637
+ clientY += win.frameElement ? win.frameElement.offsetTop : 0;
638
+
639
+ var height = consoleFrame.offsetTop + consoleFrame.clientHeight;
640
+ var y = height - clientY;
641
+
642
+ consoleFrame.style.height = y + "px";
643
+ layout();
644
+ }
645
+
646
+ function onSplitterMouseUp(event)
647
+ {
648
+ removeEvent(document, "mousemove", onSplitterMouseMove);
649
+ removeEvent(document, "mouseup", onSplitterMouseUp);
650
+
651
+ for (var i = 0; i < frames.length; ++i)
652
+ {
653
+ removeEvent(frames[i].document, "mousemove", onSplitterMouseMove);
654
+ removeEvent(frames[i].document, "mouseup", onSplitterMouseUp);
655
+ }
656
+ }
657
+
658
+ function onCommandLineKeyDown(event)
659
+ {
660
+ if (event.keyCode == 13)
661
+ evalCommandLine();
662
+ else if (event.keyCode == 27)
663
+ commandLine.value = "";
664
+ }
665
+
666
+ window.onerror = onError;
667
+ addEvent(document, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
668
+
669
+ if (document.documentElement.getAttribute("debug") == "true")
670
+ toggleConsole(true);
671
+ })();
672
+ }