diff --git a/src/css/devtool-log.css b/src/css/devtool-log.css index ca65b17eb..76ad1be36 100644 --- a/src/css/devtool-log.css +++ b/src/css/devtool-log.css @@ -58,11 +58,14 @@ input:focus { #content table tr.blocked { background-color: rgba(192, 0, 0, 0.1) } +body.colorBlind #content table tr.blocked { + background-color: rgba(0, 19, 110, 0.1) + } #content table tr.allowed { background-color: rgba(0, 160, 0, 0.1) } -#content table tr.allowed.mirrored { - background-color: rgba(255, 255, 0, 0.3) +body.colorBlind #content table tr.allowed { + background-color: rgba(255, 194, 57, 0.1) } #content table tr.maindoc { background-color: #eee; @@ -103,6 +106,12 @@ body:not(.filterOff) #content table tr.hidden { #content table tr.blocked td:nth-of-type(4) b { background-color: rgba(192, 0, 0, 0.2); } +body.colorBlind #content table tr.blocked td:nth-of-type(4) b { + background-color: rgba(0, 19, 110, 0.2); + } #content table tr.allowed td:nth-of-type(4) b { background-color: rgba(0, 160, 0, 0.2); } +body.colorBlind #content table tr.allowed td:nth-of-type(4) b { + background-color: rgba(255, 194, 57, 0.2); + } diff --git a/src/js/devtool-log.js b/src/js/devtool-log.js index 2720e1bd0..5862beb48 100644 --- a/src/js/devtool-log.js +++ b/src/js/devtool-log.js @@ -151,7 +151,10 @@ var renderLogEntry = function(entry) { /******************************************************************************/ -var renderLogBuffer = function(buffer) { +var renderLogBuffer = function(response) { + body.classList.toggle('colorBlind', response.colorBlind); + + var buffer = response.entries; if ( buffer.length === 0 ) { return; } @@ -205,10 +208,8 @@ var truncateLog = function(size) { /******************************************************************************/ -var onBufferRead = function(buffer) { - if ( Array.isArray(buffer) ) { - renderLogBuffer(buffer); - } +var onBufferRead = function(response) { + renderLogBuffer(response); setTimeout(readLogBuffer, 1000); }; diff --git a/src/js/messaging.js b/src/js/messaging.js index 3b77bb80f..d3f89f3df 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -1248,7 +1248,10 @@ var onMessage = function(request, sender, callback) { switch ( request.what ) { case 'readLogBuffer': - response = µb.logger.readAll(request.tabId); + response = { + colorBlind: µb.userSettings.colorBlindFriendly, + entries: µb.logger.readAll(request.tabId) + }; break; default: