JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
handle 256-color change sequences
[watch-my-terminal.git] / index.html
index a7f1978..25fdb39 100644 (file)
                        var $body = $('body');
                        var socket = io.connect('http://localhost');
                        var color_to_css = function(i) {
-                               index = i & 0xff
+                               index = 0xff & i;
                                // lighten the basic 8 colors when they're bold
-                               if (i & 0x10000 && index < 8) {
+                               if ((i & 0x10000) && index < 8) {
                                        index += 8;
                                }
                                return 'color: #' + palette[index] + '; ';