From fe95805d4ea705f5328d8b6a3a4648dcb358deb5 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 28 Sep 2019 20:35:30 -0400 Subject: nfsw: Update io.js * nfsw/static/io.css: Change console p -> console pre * nfsw/static/io.js: console p -> console pre --- nfsw/static/io.css | 6 +++--- nfsw/static/io.js | 14 +++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/nfsw/static/io.css b/nfsw/static/io.css index 2241011..ce18343 100644 --- a/nfsw/static/io.css +++ b/nfsw/static/io.css @@ -20,19 +20,19 @@ body { margin-bottom: 10px; } -.console p.concierge { +.console pre.concierge { margin: 0 0 0 0; border-left: 2px solid rgb(180,180,240); padding-left: 5px; } -.console p.error { +.console pre.error { margin: 0 0 0 0; border-left: 2px solid rgb(240,180,180); padding-left: 5px; } -.console p.blank { +.console pre.blank { margin: 0 0 0 0; border-left: 2px solid rgb(255,255,255); padding-left: 5px; diff --git a/nfsw/static/io.js b/nfsw/static/io.js index c141903..a1a8405 100644 --- a/nfsw/static/io.js +++ b/nfsw/static/io.js @@ -123,7 +123,7 @@ document.addEventListener('DOMContentLoaded', function() { } barfblank(); - p = document.createElement('p'); + p = document.createElement('pre'); p.className = type; p.append(txt); @@ -133,10 +133,10 @@ document.addEventListener('DOMContentLoaded', function() { return ''; } function barfblank() { - p = document.createElement('p'); + p = document.createElement('pre'); p.className = 'blank'; - p.innerHTML = '
'; + p.innerHTML = '\n'; ioconsole.appendChild(p); } @@ -148,14 +148,10 @@ document.addEventListener('DOMContentLoaded', function() { return ''; } - nl = false; - if (txt.charAt(0) == '\n') - nl = true; - if (!p) barfblank(); - if (!p || nl) { - p = document.createElement('p'); + if (!p) { + p = document.createElement('pre'); p.className = type; ioconsole.appendChild(p); -- cgit v1.2.3