diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-16 21:00:56 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-16 21:00:56 -0400 |
commit | a5f25638d5b6076d4a1d1c0ffe647ab95edc91b7 (patch) | |
tree | 828d7b86725adb57e95b3be89deb1b95bf978ae1 /termcast_server | |
parent | 66782723dcf1aaef7fb04bd54e85d9d98f303ab7 (diff) | |
download | python-termcast-server-a5f25638d5b6076d4a1d1c0ffe647ab95edc91b7.tar.gz python-termcast-server-a5f25638d5b6076d4a1d1c0ffe647ab95edc91b7.zip |
0 is a valid fg/bg color
Diffstat (limited to 'termcast_server')
-rw-r--r-- | termcast_server/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/termcast_server/index.html b/termcast_server/index.html index 6980fa8..cf65341 100644 --- a/termcast_server/index.html +++ b/termcast_server/index.html @@ -311,10 +311,10 @@ socket.onmessage = function (e) { term += '<td'; if (cell.fgcolor || cell.bgcolor) { term += ' style="'; - if (cell.fgcolor) { + if (cell.fgcolor != null) { term += 'color: ' + colors[cell.fgcolor] + ';'; } - if (cell.bgcolor) { + if (cell.bgcolor != null) { term += 'background-color: ' + colors[cell.bgcolor] + ';'; } term += '"'; @@ -344,10 +344,10 @@ socket.onmessage = function (e) { contents = " "; } td.innerHTML = contents; - if (update.cell.fgcolor) { + if (update.cell.fgcolor != null) { td.style.setProperty('color', colors[update.cell.fgcolor]); } - if (update.cell.bgcolor) { + if (update.cell.bgcolor != null) { td.style.setProperty('background-color', colors[update.cell.bgcolor]); } else { |