3

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 correctly. But after this process set_mask('*') will remain.

I've tried this.set_mask(false); but it doesn't work. How to unset this mask?

Any help is appreciated

pyxgun
  • 41
  • 3

2 Answers2

1

My solution and here is an example of variable declarations and a bit of code.

var term = $(".terminal").terminal({
  signin: function() {
    this.read("user id: ").then(userId =>
    this.set_mask('*').read("password: ").then(password =>
      // signin process
    term.set_mask(false);    // it works!
    // this.set_mask(false); // it doesn't work
    ));
  }
});

Thank you and hope this code will help anyone

pyxgun
  • 41
  • 3
0

Maybe that helps.

set_mask is defined as a boolean
set_mask(false or true)

I'm not familiar with Jquery Terminal. Maybe you can use for example if (mask....) {

mask

Just explore the examples https://terminal.jcubic.pl/examples.php

Bernhard Beatus
  • 1,191
  • 1
  • 5
  • 6
  • I've solved this problem, thank you for your help! – pyxgun Mar 30 '21 at 09:32
  • @pyxgun if you solved the issue and not with this answer then maybe you should create own answer so others will benefit. Answers like this is not useful to anybody (note that this looks like question and single answer never mind I solve it). – jcubic Mar 30 '21 at 16:58