Skip to content

Commit

Permalink
Add ability to get all input and output for a session.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaine Schmeisser committed Dec 28, 2014
1 parent 11feffd commit 3029c5f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@
addSequence("\x1B[", parseVT100);

window.APP = {
socket: socket
socket: socket,
input: [],
output: []
};

function appendContent(data) {
Expand Down Expand Up @@ -272,7 +274,7 @@
}
}

return output;
return '<div class="output">' + output + '</div>';
}

$(window.document).keydown(function (e) {
Expand Down Expand Up @@ -383,6 +385,7 @@

socket.on("console", function (data) {
clearCursor();
window.APP.output.push(data);
appendContent(convertToHtml(data));
addPromptLine();
});
Expand Down Expand Up @@ -413,6 +416,7 @@
// Handle 'enter'.
if (charCode === 13) {
clearCursor(true);
window.APP.input.push(currentLine);
if (currentLine.length > 0) {
// Send...
if (currentLine === "exit") {
Expand Down

0 comments on commit 3029c5f

Please sign in to comment.