使用方法
let shell = $("#command-line").shell({ // calls the init method
enableGlitch: false,
User: "root",
startup: function (shell) {
shell.print("Server", "A!");
shell.print("Server", "A!───────▀▄───▄▀────────");
shell.print("Server", "A!──────▄█▀███▀█▄───────");
shell.print("Server", "A!─────█▀███████▀█──────");
shell.print("Server", "A!─────█─█▀▀▀▀▀█─█──────");
shell.print("Server", "A!────────▀▀─▀▀─────────");
shell.print("Server", "A!");
shell.print("", "A!");
shell.print("Client", "For help say '/help' Enter");
shell.print("Client", "");
}
});
shell.register("/help", function (shell, command) {
shell.print("", "help : Show commands", 5);
shell.print("", "clear : Clear the console", 5);
shell.print("", "version : Version info", 5);
shell.print("", "about : personal summary", 5);
shell.error("be aware of errors");
});
let shell2 = $("#command-line2").shell({ // calls the init method
enableGlitch: true,
User: "admin",
startup: function (shell) {
shell.print("Server", "A!");
shell.print("Server", "A!");
shell.print("", "A!");
shell.print("Client", "For help say 'help' Enter");
shell.print("Client", "");
}
});
shell2.register("help", function (shell, command) {
shell.print("", "help : Show commands", 5);
shell.print("", "clear : Clear the console", 5);
shell.print("", "version : Version info", 5);
});
shell2.register("version", function (shell, command) {
shell.print("", "ProductName: Mac OS X", 5);
shell.print("", "ProductVersion: 10.11.1", 5);
});
// fallback for handling unrecognized command or user input
shell2.fallback(function (shell, command) {
shell.error(`I'm not getting this "${command}"`);
});
站长提示:
1. 苦力吧素材官方QQ群:
950875342
2. 平台上所有素材资源,需注册登录会员方能正常下载。
3. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励
2K币。
4. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
5. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服