aboutsummaryrefslogtreecommitdiffstats
path: root/termcast_server
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-16 21:00:56 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-16 21:00:56 -0400
commita5f25638d5b6076d4a1d1c0ffe647ab95edc91b7 (patch)
tree828d7b86725adb57e95b3be89deb1b95bf978ae1 /termcast_server
parent66782723dcf1aaef7fb04bd54e85d9d98f303ab7 (diff)
downloadpython-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.html8
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 = "&nbsp;";
}
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 {