Ptty
1.0.0
PTTY是一個jQuery插件,可創建可擴展的終端模擬器。它很小,很快,可以通過添加命令和回調來完全自定義。
PTTY帶有一組小助手,以便盡可能輕巧和可擴展,它可以:
$.register_command()
方法擴展Demmand。$.register_callback()
命令添加回調(包括其他jQuery插件)。$.flush_commands()
方法命令刷新。要啟動PTTY,請只做以下操作:
$(document).ready(function(){
$('#terminal').Ptty();
});
或者您可以使用選項:
$(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.'
});
});
請參閱在線文檔,以了解插件選項和響應結構或查看演示,目前僅處理離線命令,但可以演示基礎知識。
版本0.1.0: