Questions tagged [jquery-terminal]

JQuery Terminal Emulator is a plugin for creating command line interpreters in your applications.

JQuery Terminal Emulator is a plugin for creating command line interpreters in your applications. It can automatically call JSON-RPC service when user type commands or you can provide an object with methods, each method will be invoke on user command. Object can have nested objects which will create nested interpreter. You can also use a function in which you can parse user command by your own. It′s ideal if you want to provide additional functionality for power users. It can also be used as debugging tool.

  • You can create interpreter for your JSON-RPC service with one line of code.
  • Support for authentication (you can provide function when user enter login and password or if you use JSON-RPC it can automatically call login function on the server and pass token to all functions)
  • Stack of interpreters - you can create commands that trigger additional interpreters (eg. you can use couple of JSON-RPC service and run them when user type command)
  • Command Tree - you can use nested objects each command will invoke a function if the value is an object it will create new interpreter and use function from that object as commands. You can use as much nested commands as you like. if the value is a string it will create JSON-RPC service.
  • Tab completion with TAB key.
  • Support for command line history (it uses Local Storage if possible or cookies)
  • Include keyboard shortcut from bash like CTRL+A, CTRL+D, CTRL+E etc.
  • Multiply terminals on one page (every terminal can have different command, it′s own authentication function and it′s own command history) - you can switch between them with CTRL+TAB
  • It catch all exceptions and display error messages in terminal (you can see errors in your javascript and php code in terminal if they are in interpreter function)
  • Support for basic text formatting (color, background, underline, bold, italic) inside echo function
  • You can create and overwrite existing keyboard shortcuts

https://terminal.jcubic.pl/

120 questions
13
votes
1 answer

How can I run an interactive program compiled with Emscripten in a web page?

I've got a simple program, say the following: #include int main() { char buf[100]; while (fgets(buf, sizeof(buf), stdin) != NULL) { printf("You typed: %s", buf); } } and I have compiled it using Emscripten: emcc -o…
Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
7
votes
1 answer

Touch move fire only once when implementing "less" like scrolling on mobile

I'm trying to to implement touch scroll in less extension to jQuery Terminal. It work similar to less unix command. I have this code: self.touch_scroll(function(event) { // how much difference changed since last touch move var delta =…
jcubic
  • 61,973
  • 54
  • 229
  • 402
6
votes
1 answer

Match cursor position for substring after text replace

TL;DR I have function that replace text, a string and cursor position (a number) and I need to get corrected position (a number) for new string that is created with replace function if the length of the string changes: input and cursor position: …
jcubic
  • 61,973
  • 54
  • 229
  • 402
6
votes
3 answers

webpack jquery plugin loading its own instance of jquery

I've been trying to load a jquery plugin through webpack. This plugin is packaged as a npm module and in its dependencies includes only jquery. I think webpack loads that instance of jquery instead of using the one I provide globally with the…
4
votes
1 answer

How to parse cursor ANSI escape codes?

I'm writing code for processing ANSI escape codes for cursor for jQuery Terminal. but have problems, not sure how it should work, I've got weird results. I'm testing with ervy library. and using this code: function scatter_plot() { const…
jcubic
  • 61,973
  • 54
  • 229
  • 402
3
votes
2 answers

how do i use exceptionHandler in jquery.terminal

I'm doing something using different apis in jquery terminal but, If the user makes a mistake, the error message looks like this code: gemini: function(a){ $.ajaxSetup({async: false}); $.get('https://api.github.com/repos/'+a, function(x){ b…
3
votes
2 answers

jQuery terminal: how to unset mask?

I'm using jQuery Terminal to build my site. Now I'm building signin command: signin: function() { this.read("user id: ").then(userId => this.set_mask('*').read("password: ").then(password => // signin process )); } This code works…
pyxgun
  • 41
  • 3
3
votes
1 answer

Creating a Linux terminal themed website using HTML and JavaScript

I am trying to create a Linux terminal themed website which has multiple commands. The user has liberty to use whichever commands he/she wants just like a normal terminal. I've created a sample HTML file and included a simple function which displays…
Esh200111
  • 71
  • 1
  • 8
3
votes
1 answer

Add color to JQuery Terminal

I am trying to add color the the jquery terminal like a bash terminal in linux. I have tried the same arrangement of color codes \033]01;31\] # pink \033]00m\] # white \033]01;36\] # bold green \033]02;36\] # green \033]01;34\] # blue \033]01;33\]…
user5664095
3
votes
1 answer

Set focus to jQuery Terminal that is within an iframe

I have an iframe that contains a Jquery Terminal. The iframe is hidden and I'll show when I press a button. The problem that I have it's that I must click the terminal to set the focus on it and is a little annoying. I tried to write a script that…
user2088019
2
votes
2 answers

How to run a video file in jquery-terminal

I am trying to create a website based on the initial graphics of jquery.terminal and I have noticed that there are currently no questions related to video management. I got to see questions related to images, such as this one Creating a Linux…
Aleff
  • 61
  • 8
2
votes
0 answers

JQuery Terminal - How to prevent a command line being displayed in the terminal history

Does anyone know how to prevent a command from going into history in JQuery Terminal? That is, when a command is typed it triggers my : var term = $('body').terminal( function(command) { //stuff here for dealing with the contents of…
Richard
  • 1,070
  • 9
  • 22
2
votes
0 answers

Browser becoming sluggish after upgrading to jquery.terminal-2.19.2.js

we have a web application where we have web terminal to fire some commands from there and request goes back to server via websocket for processing and result comes to the browser and displayed back on the web-terminal. This web terminal is developed…
2
votes
1 answer

How to send a command to the shell with jQuery Terminal?

I want to build a Web-based Terminal and I want to execute a shell command. How can I use jQuery Terminal library to send command to shell and print the reply?
jcubic
  • 61,973
  • 54
  • 229
  • 402
2
votes
1 answer

jQuery terminal - Reading shell response in Java as string shows weird characters in jQuery terminal

I'm currently using a piped input/output stream principe to read from and write to a shell channel using JSCH. Problem: I'm getting weird characters in my jQuery terminal when I transport the response of the shell to jQuery terminal. Weird…
Displee
  • 670
  • 8
  • 20
1
2 3 4 5 6 7 8