Ptty
1.0.0
Ptty is a jQuery plugin that creates an expansible terminal emulator. It is small, it is fast and it is fully customizable by adding commands and callbacks.
Ptty comes with a set of little helpers so to be as light and scalable as possible, It can:
$.register_command()
method.$.register_callback()
command.$.flush_commands()
method.To start Ptty simply do the following:
$(document).ready(function(){
$('#terminal').Ptty();
});
Or you can use options:
$(document).ready(function(){
$('#terminal').Ptty({
// Default ajax URL (can be relative or absolute).
url : 'ajax/',
// Set the PS to an empty string and change the defaults to use a custom css theme.
ps : '',
theme : 'boring',
welcome: 'Welcome to the matrix.'
});
});
Please see the online documentation to learn about the plugin options and response structure or look at the Demo, which at the moment only deals with offline commands but demonstrates the basics none the less.
For version 0.1.0: