blob: 97b690a5d559002efeabda3e4eae05d0edb5620a [file] [log] [blame]
Scott Baker999edc62014-06-18 15:40:56 -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 }
Scott Bakerc9dcc782014-06-19 22:42:49 -070017 return "<div class='terminal_line'>" +
Scott Baker999edc62014-06-18 15:40:56 -070018 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) {
Scott Bakerbf1610d2014-06-18 18:22:03 -070028 return '<pre class="terminal_help">' + str + '</pre>';
Scott Baker999edc62014-06-18 15:40:56 -070029}
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
Scott Baker2c3d5a82014-06-19 16:51:16 -070039var MongoKeywords = ['help','tutorial','next','back','t0','t1','t2','t3','t4'];