-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
73 lines (66 loc) · 2.61 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>ECMAchine</title>
<script src="js/lib/jquery-1.7.1.min.js"></script>
<script src="js/lib/jquery.terminal.js"></script>
<script src="js/lib/es5-shim.min.js"></script>
<script src="js/helpers.js"></script>
<script src="js/environment.js"></script>
<script src="js/evaluator.js"></script>
<script src="js/os.js"></script>
<script src="js/primitives.js"></script>
<link href="css/jquery.terminal.css" rel="stylesheet"/>
<script>
jQuery(document).ready(function($) {
$(document.documentElement).terminal(function(command, term) {
if (command !== '') {
if ((command.split('(').length > command.split(')').length) || (command.split('"').length + 1) % 2 == 1) {
// incomplete expression - remove from lines and history
Display.newline(command);
} else {
var result = evaluate(command);
if (result !== undefined) {
Display.echo(result);
} else {
Display.refresh();
}
}
} else {
Display.echo('');
}
}, {
greetings: 'Welcome to the ECMAchine! It\'s a little LISPy shell that dreams of being an operating system. Enter (help) for a list of commands. Read more at https://github.com/AlexNisnevich/ECMAchine',
name: 'terminal',
height: 200,
prompt: 'ecmachine:/ guest$',
onInit: function(term) {
$('body').css('margin', '0');
$('<div>').attr('id', 'overlays').appendTo('.terminal');
Display.initialize(term);
OS.initialize();
Display.resize();
},
// custom options
historycolors: {
'prompt': '#080',
'command': '#399'
}
});
$(window).resize(Display.refresh);
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-345959-10']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
</body>