From 348c965f124f52fb487929162126bcd7bd12606e Mon Sep 17 00:00:00 2001 From: Thibault DUPONCHELLE Date: Mon, 12 Oct 2015 15:06:03 +0200 Subject: [PATCH] Keep welcome message (if any) after clearScreen --- jquery.console.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/jquery.console.js b/jquery.console.js index 7679827..1cba3dd 100644 --- a/jquery.console.js +++ b/jquery.console.js @@ -428,14 +428,16 @@ }; function clearCurrentPrompt() { - extern.promptText(""); + extern.promptText(""); }; function clearScreen() { - inner.children(".jquery-console-prompt-box, .jquery-console-message").remove(); - extern.report(" "); - extern.promptText(""); - extern.focus(); + inner.children(".jquery-console-prompt-box, .jquery-console-message").remove(); + if (config.welcomeMessage) + message(config.welcomeMessage,'jquery-console-welcome'); + extern.report(" "); + extern.promptText(""); + extern.focus(); }; function deleteNextWord() {