blob: 97b690a5d559002efeabda3e4eae05d0edb5620a [file] [log] [blame]
Scott Baker95d6c5c2014-07-07 21:54:35 -07001// TryMongo
2//
3// Copyright (c) 2009 Kyle Banker
4// Licensed under the MIT Licence.
5// http://www.opensource.org/licenses/mit-license.php
6
7var DefaultInputHtml = function(stack) {
8 var linePrompt = "";
9 if(stack == 0) {
10 linePrompt += "<span class='prompt'> ></span>";
11 }
12 else {
13 for(var i=0; i <= stack; i++) {
14 linePrompt += "<span class='prompt'>.</span>";
15 }
16 }
17 return "<div class='terminal_line'>" +
18 linePrompt +
19 "<input type='text' class='readLine active' />" +
20 "</div>";
21}
22
23var EnterKeyCode = 13;
24var UpArrowKeyCode = 38;
25var DownArrowKeyCode = 40;
26
27var PTAG = function(str) {
28 return '<pre class="terminal_help">' + str + '</pre>';
29}
30
31var BR = function() {
32 return "<br/>";
33}
34
35var JavascriptKeywords = ['abstract', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', 'continue', 'debugger', 'default', 'delete', 'do', 'double', 'else', 'enum', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import', 'in', 'instanceof', 'int', 'interface', 'long', 'native', 'new', 'null', 'package', 'private', 'protected', 'public', 'return', 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try', 'typeof', 'var', 'void', 'volatile', 'while', 'with', 'alert', 'date', 'eval'];
36
37var JavascriptClassNames = ['Array', 'String', 'Object']
38
39var MongoKeywords = ['help','tutorial','next','back','t0','t1','t2','t3','t4'];