-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterminal.html
More file actions
33 lines (33 loc) · 793 Bytes
/
terminal.html
File metadata and controls
33 lines (33 loc) · 793 Bytes
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
<html id="terminal">
<head>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://unpkg.com/js-polyfills@0.x.x/keyboard.js"></script>
<script src="jquery.terminal.js"></script>
<link href="jquery.terminal.css" rel="stylesheet"/>
<title>Terminal</title>
</head>
<body>
<script>
jQuery(function($, undefined) {
$('#terminal').terminal({
add: function(a, b) {
this.echo(a + b);
},
re: function(re, str) {
if (re instanceof RegExp && re.test(str)) {
this.echo(str + ' [[;green;]match]');
}
},
foo: 'foo.php',
bar: {
sub: function(a, b) {
this.echo(a - b);
}
}
}, {
prompt: 'devetec> '
});
});
</script>
</body>
</html>