JQuery Terminal
http://stackoverflow.com/q/26664856/1144203
HTML
<script src="http://terminal.jcubic.pl/js/jquery.terminal-0.8.8.min.js"></script>
<link rel="stylesheet" href="http://terminal.jcubic.pl/css/jquery.terminal.css">
<div id="terminal"></div>
CSS
.terminal div{
margin-bottom: 10px;
}
.terminal-output, .cmd{
font-size: 2em !important;
}
JavaScript
(function($){
$('#terminal').terminal(function(command, term) {
if (command !== '') {
try {
var result = window.eval(command);
if (result !== undefined)
term.echo(new String(result));
} catch(e) {
term.error(new String(e));
}
} else
term.echo('');
},
{
// greetings: 'Javascript Terminal', // uncomment for custom greetings
name: 'js_demo',
height: 300,
width:900, // adjust width accordingly
prompt: '<js> '
});
})(jQuery);