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(str, 'jqconsole-output', false);
78 var startPrompt = function () {
79 // Start the prompt with history enabled.
80 jqconsole.Write(lisp.evalString(pv, '(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, input);
86 for (var i=0; i<vs.length; i++){
87 jqconsole.Write(lisp.print(pv, vs[i]) + '\n', 'jqconsole-return');
90 jqconsole.Write('ERROR: ' + (error.message || error) + '\n', 'jqconsole-error');
93 jqconsole.Write(lisp.compileString(pv, input.slice(1)) + '\n', 'jqconsole-return');
95 // Restart the prompt.
99 lisp.read(pv, input[0]==','? input.slice(1): input);