Implement the "gag prompt" option
This commit is contained in:
parent
9efed33fb5
commit
da7a71e6dd
1 changed files with 9 additions and 0 deletions
|
|
@ -15,6 +15,8 @@
|
||||||
(function () {
|
(function () {
|
||||||
"use strict"
|
"use strict"
|
||||||
|
|
||||||
|
|
||||||
|
var options = {};
|
||||||
//
|
//
|
||||||
// GUI Elements
|
// GUI Elements
|
||||||
//
|
//
|
||||||
|
|
@ -235,6 +237,11 @@ function onPrompt(args, kwargs) {
|
||||||
.addClass("out")
|
.addClass("out")
|
||||||
.html(args[0]);
|
.html(args[0]);
|
||||||
doWindowResize();
|
doWindowResize();
|
||||||
|
|
||||||
|
// also display the prompt in the output window if gagging is disabled
|
||||||
|
if (("gagprompt" in options) && (!options["gagprompt"])) {
|
||||||
|
onText(args, kwargs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the user logged in
|
// Called when the user logged in
|
||||||
|
|
@ -244,6 +251,8 @@ function onLoggedIn() {
|
||||||
|
|
||||||
// Called when a setting changed
|
// Called when a setting changed
|
||||||
function onGotOptions(args, kwargs) {
|
function onGotOptions(args, kwargs) {
|
||||||
|
options = kwargs;
|
||||||
|
|
||||||
$.each(kwargs, function(key, value) {
|
$.each(kwargs, function(key, value) {
|
||||||
var elem = $("[data-setting='" + key + "']");
|
var elem = $("[data-setting='" + key + "']");
|
||||||
if (elem.length === 0) {
|
if (elem.length === 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue