5 /* The console container element */
6 body { background-color: black; font-size: 16px; font-family: Courier; overflow: hidden; padding: 0 0 0 0;}
13 background-color:black;
20 /* The inner console element. */
26 background-color: gray;
28 /* The cursor color when the console looses focus. */
29 .jqconsole-blurred .jqconsole-cursor {
30 background-color: #666;
32 /* The current prompt text color */
36 /* The command history */
37 .jqconsole-old-prompt {
41 /* The text color when in input mode. */
45 /* Previously entered input. */
46 .jqconsole-old-input {
50 /* The text color of the output. */
54 .jqconsole-return, .jqconsole-header {
64 <div id="console"></div>
65 <script src="jscl.js" type="text/javascript"></script>
66 <script src="jquery.js" type="text/javascript" charset="utf-8"></script>
67 <script src="jqconsole.min.js" type="text/javascript" charset="utf-8"></script>
70 var jqconsole = $('#console').jqconsole('Welcome to JSCL!\n\n', '');
71 jqconsole.RegisterMatching('(', ')', 'parents');
73 lisp.write = function(str){
74 jqconsole.Write(xstring(str), 'jqconsole-output', false);
78 var startPrompt = function () {
79 // Start the prompt with history enabled.
80 jqconsole.Write(xstring(lisp.evalString(pv, 1, make_lisp_string('(CL:PACKAGE-NAME CL:*PACKAGE*)'))) + '> ', 'jqconsole-prompt');
81 jqconsole.Prompt(true, function (input) {
82 // Output input with the class jqconsole-return.
85 var vs = lisp.evalInput(mv, 1, make_lisp_string(input));
86 for (var i=0; i<vs.length; i++){
87 jqconsole.Write(xstring(lisp.print(pv, 1, vs[i])) + '\n', 'jqconsole-return');
90 var msg = error.message || error || 'Unknown error';
91 if (typeof(msg) != 'string') msg = xstring(msg);
92 jqconsole.Write('ERROR: ' + msg + '\n', 'jqconsole-error');
95 jqconsole.Write(xstring(lisp.compileString(pv, 1, make_lisp_string(input.slice(1)))) + '\n', 'jqconsole-return');
97 // Restart the prompt.
101 lisp.read(pv, 1, make_lisp_string(input[0]==','? input.slice(1): input));