Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
watch-my-terminal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handle 256-color change sequences
[watch-my-terminal.git]
/
index.html
diff --git
a/index.html
b/index.html
index
738d7d7
..
25fdb39
100644
(file)
--- a/
index.html
+++ b/
index.html
@@
-272,9
+272,9
@@
var $body = $('body');
var socket = io.connect('http://localhost');
var color_to_css = function(i) {
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
// 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] + '; ';
index += 8;
}
return 'color: #' + palette[index] + '; ';
@@
-283,7
+283,7
@@
return 'background-' + color_to_css((i&0x10000) | ((i&0xff00) >> 8));
};
var stylize = function (txt, style) {
return 'background-' + color_to_css((i&0x10000) | ((i&0xff00) >> 8));
};
var stylize = function (txt, style) {
- if (txt.length == 0 || style == 0) {
+ if (txt.length == 0 || style == 0x000007) {
return txt
}
css = ''
return txt
}
css = ''
@@
-302,7
+302,7
@@
for (i in term.text) {
div = $('<div>');
txt = ''
for (i in term.text) {
div = $('<div>');
txt = ''
- a = 0;
+ a = 0x000007;
for (j in term.text[i]) {
if (term.attributes[i][j] != a) {
if (txt.length) {
for (j in term.text[i]) {
if (term.attributes[i][j] != a) {
if (txt.length) {