diff --git a/src/browser/screen.js b/src/browser/screen.js index 8c60cff6bf..6059bc19ce 100644 --- a/src/browser/screen.js +++ b/src/browser/screen.js @@ -497,8 +497,9 @@ function ScreenAdapter(screen_container, bus) bg_color = text_mode_data[offset + BG_COLOR_INDEX]; fg_color = text_mode_data[offset + FG_COLOR_INDEX]; - if (blinking) { - color_element.classList.add('blink'); + if(blinking) + { + color_element.classList.add("blink"); } color_element.style.backgroundColor = number_as_color(bg_color); diff --git a/src/vga.js b/src/vga.js index 15d35888ec..21d392160b 100644 --- a/src/vga.js +++ b/src/vga.js @@ -851,7 +851,7 @@ VGAScreen.prototype.text_mode_redraw = function() const split_screen_row = this.scan_line_to_screen_row(this.line_compare); const row_offset = Math.max(0, (this.offset_register * 2 - this.max_cols) * 2); - const blink_flag = this.attribute_mode & (1<<3); + const blink_flag = this.attribute_mode & 1 << 3; const bg_color_mask = blink_flag ? 7 : 0xF; for(var row = 0; row < this.max_rows; row++) @@ -865,7 +865,7 @@ VGAScreen.prototype.text_mode_redraw = function() { chr = this.vga_memory[addr]; color = this.vga_memory[addr | 1]; - blinking = blink_flag && (color & (1<<7)); + blinking = blink_flag && (color & 1 << 7); this.bus.send("screen-put-char", [row, col, chr, blinking, this.vga256_palette[this.dac_mask & this.dac_map[color >> 4 & bg_color_mask]], @@ -920,8 +920,8 @@ VGAScreen.prototype.vga_memory_write_text_mode = function(addr, value) chr = value; color = this.vga_memory[addr | 1]; } - const blink_flag = this.attribute_mode & (1<<3); - const blinking = blink_flag && (color & (1<<7)); + const blink_flag = this.attribute_mode & 1 << 3; + const blinking = blink_flag && (color & 1 << 7); const bg_color_mask = blink_flag ? 7 : 0xF; this.bus.send("screen-put-char", [row, col, chr, blinking, diff --git a/v86.css b/v86.css index 5b6eaf96d5..2926f47c34 100644 --- a/v86.css +++ b/v86.css @@ -130,6 +130,22 @@ h4 { #terminal { max-width: 1024px; } +.blink { + animation: blink 0.6s step-start infinite; +} +@keyframes blink { + 50% { + color: transparent; + } +} +.cursor { + animation: cursor 0.6s step-start infinite; +} +@keyframes cursor { + 50% { + background-color: transparent; + } +} /* the code below was copied from xterm.css */ @@ -305,24 +321,3 @@ h4 { z-index: 2; position: relative; } - -.blink { - animation: blink 0.6s step-start infinite; -} - -.cursor { - animation: cursor 0.2s step-start infinite; -} - -@keyframes blink { - 50% { - color: transparent; - } -} - -@keyframes cursor { - 50% { - background-color: transparent; - } -} -