This is a HTML/Javascript package that emulates a terminal window. It tries to catch any and all keyboard input and is able to send it to an API as a string. Usually, you'll want to echo the response.
To initiate a "window" create a new BeardBash object with at least one argument, the ID of the HTML element (with '#', as in CSS selector). You should be able to initialize more than one instance on the same page, as long as the ID's dont conflict.
The functions to send to the API and receive from the API are defined in respectively the second and third argument of the BeardBash class constructor.
You can use css/lessphp.php and css/beardbash.less compile a css file (css/beardbash.css). Drive a terminal to your clone/fork and type './less', or something similar to:
php css/lessphp.php > css/beardbash.css
- Make HTML generated by BeardBash more customizable
- Check for cross-browser issues (only tested in Chrome, ha!)
- Remove console.logs
- Build a really awesome example with multiple windows
This work is licensed under a Creative Commons CC BY-NC-SA 3.0 license. In short:
- Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
- Noncommercial — You may not use this work for commercial purposes.
- Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
The code in this repository was written by Wybe Minnebo (wybe@x-54.com) from http://www.x-54.com. Please leave any existing commented sections with this name and URL in place.
For more information: http://creativecommons.org/licenses/by-nc-sa/3.0/