mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-04 01:59:38 +02:00
import color-blind color scheme into logger
This commit is contained in:
parent
361d2ac1a2
commit
87a14ff339
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user