1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

Use a different surface color for scriptlets in logger

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2636
This commit is contained in:
Raymond Hill 2023-05-06 18:56:00 -04:00
parent 7f9c4ce45f
commit bc02358610
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 11 additions and 2 deletions

View File

@ -249,6 +249,9 @@ body[dir="rtl"] #netInspector #filterExprPicker {
#vwRenderer .logEntry > div.redirect { #vwRenderer .logEntry > div.redirect {
background-color: var(--logger-redirected-surface); background-color: var(--logger-redirected-surface);
} }
#vwRenderer .logEntry > div.extendedRealm.scriptlet {
background-color: var(--logger-scriptlet-surface);
}
:root.colorBlind #vwRenderer .logEntry > div.extendedRealm, :root.colorBlind #vwRenderer .logEntry > div.extendedRealm,
:root.colorBlind #vwRenderer .logEntry > div.redirect { :root.colorBlind #vwRenderer .logEntry > div.redirect {
background-color: rgba(0, 19, 110, 0.1); background-color: rgba(0, 19, 110, 0.1);

View File

@ -297,8 +297,9 @@
/* logger */ /* logger */
--logger-modified-surface: #0000c010; --logger-modified-surface: #0000c010;
--logger-redirected-surface: rgb(var(--yellow-5) / 50%);
--logger-modified-em-surface: #0000c028; --logger-modified-em-surface: #0000c028;
--logger-redirected-surface: rgb(var(--yellow-5) / 50%);
--logger-scriptlet-surface: rgb(var(--yellow-30) / 50%);
} }
/* https://material.io/design/color/dark-theme.html */ /* https://material.io/design/color/dark-theme.html */
@ -374,6 +375,7 @@
/* logger */ /* logger */
--logger-modified-surface: #663efd60; --logger-modified-surface: #663efd60;
--logger-redirected-surface: rgb(var(--yellow-5) / 40%); --logger-redirected-surface: rgb(var(--yellow-5) / 40%);
--logger-scriptlet-surface: rgb(var(--yellow-30) / 40%);
} }
:root.dark input, :root.dark input,

View File

@ -797,7 +797,11 @@ const viewPort = (( ) => {
} }
} }
span = div.children[COLUMN_FILTER]; span = div.children[COLUMN_FILTER];
if ( renderFilterToSpan(span, cells[COLUMN_FILTER]) === false ) { if ( renderFilterToSpan(span, cells[COLUMN_FILTER]) ) {
if ( /^\+js\(.*\)$/.test(span.children[1].textContent) ) {
divcl.add('scriptlet');
}
} else {
span.textContent = cells[COLUMN_FILTER]; span.textContent = cells[COLUMN_FILTER];
} }