+31
-18
lines changedFilter options
+31
-18
lines changed Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
14
14
padding-left: 0.5em;
15
15
}
16
16
#domInspector ul {
17
-
background-color: #fff;
17
+
background-color: var(--default-surface);
18
18
margin: 0;
19
19
padding-left: 1em;
20
20
}
@@ -37,7 +37,7 @@
37
37
color: #aaa;
38
38
}
39
39
#domInspector li > span:first-child {
40
-
color: #000;
40
+
color: var(--default-ink);
41
41
cursor: default;
42
42
font-size: 1rem;
43
43
margin-right: 0;
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ textarea {
12
12
width: 100%;
13
13
}
14
14
.permatoolbar {
15
-
background-color: white;
15
+
background-color: var(--default-surface);
16
16
border: 0;
17
17
box-sizing: border-box;
18
18
display: flex;
@@ -34,7 +34,7 @@ textarea {
34
34
fill: #5F9EA0;
35
35
}
36
36
.permatoolbar .button:hover {
37
-
background-color: #eee;
37
+
background-color: var(--default-surface-hover);
38
38
}
39
39
#pageSelector {
40
40
min-width: 10em;
@@ -135,7 +135,7 @@ body[dir="rtl"] #pageSelector {
135
135
transform: scaleY(1);
136
136
}
137
137
#netInspector #filterExprPicker {
138
-
background-color: white;
138
+
background-color: var(--default-surface);
139
139
border: 1px solid gray;
140
140
display: none;
141
141
position: absolute;
@@ -445,7 +445,7 @@ body.colorBlind #netFilteringDialog > .panes > .details > div[data-status="2"] b
445
445
}
446
446
447
447
#popupContainer {
448
-
background: white;
448
+
background-color: var(--default-surface);
449
449
border: 1px solid gray;
450
450
bottom: 0;
451
451
display: none;
@@ -481,7 +481,7 @@ body.colorBlind #netFilteringDialog > .panes > .details > div[data-status="2"] b
481
481
position: relative;
482
482
}
483
483
#modalOverlay > div > div:nth-of-type(1) {
484
-
background-color: white;
484
+
background-color: var(--default-surface);
485
485
border: 0;
486
486
box-sizing: border-box;
487
487
padding: 1em;
@@ -490,13 +490,13 @@ body.colorBlind #netFilteringDialog > .panes > .details > div[data-status="2"] b
490
490
width: 90vw;
491
491
}
492
492
#modalOverlay > div > div:nth-of-type(2) {
493
-
stroke: #000;
493
+
stroke: var(--default-ink);
494
494
stroke-width: 3px;
495
495
position: absolute;
496
496
width: 1.6em;
497
497
height: 1.6em;
498
498
bottom: calc(100% + 2px);
499
-
background-color: white;
499
+
background-color: var(--default-surface);
500
500
}
501
501
body[dir="ltr"] #modalOverlay > div > div:nth-of-type(2) {
502
502
right: 0;
@@ -505,7 +505,7 @@ body[dir="rtl"] #modalOverlay > div > div:nth-of-type(2) {
505
505
left: 0;
506
506
}
507
507
#modalOverlay > div > div:nth-of-type(2):hover {
508
-
background-color: #eee;
508
+
background-color: var(--default-surface-hover);
509
509
}
510
510
#modalOverlay > div > div:nth-of-type(2) > * {
511
511
pointer-events: none;
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ const µBlock = (( ) => { // jshint ignore:line
77
77
uiPopupConfig: 'undocumented',
78
78
uiFlavor: 'unset',
79
79
uiStyles: 'unset',
80
+
uiTheme: 'unset',
80
81
updateAssetBypassBrowserCache: false,
81
82
userResourcesLocation: 'unset',
82
83
};
Original file line number Diff line number Diff line change
@@ -160,7 +160,10 @@ const onMessage = function(request, sender, callback) {
160
160
break;
161
161
162
162
case 'uiStyles':
163
-
response = µb.hiddenSettings.uiStyles;
163
+
response = {
164
+
uiStyles: µb.hiddenSettings.uiStyles,
165
+
uiTheme: µb.hiddenSettings.uiTheme,
166
+
};
164
167
break;
165
168
166
169
case 'userSettings':
Original file line number Diff line number Diff line change
@@ -93,6 +93,22 @@ DOMListFactory.nodeFromSelector = function(selector) {
93
93
/******************************************************************************/
94
94
95
95
{
96
+
// https://github.com/uBlockOrigin/uBlock-issues/issues/1044
97
+
// Offer the possibility to bypass uBO's default styling
98
+
vAPI.messaging.send('uDom', { what: 'uiStyles' }).then(response => {
99
+
if ( typeof response !== 'object' || response === null ) { return; }
100
+
if ( response.uiTheme !== 'unset' ) {
101
+
if ( response.uiTheme === 'light' ) {
102
+
root.classList.remove('dark');
103
+
} else if ( response.uiTheme === 'dark' ) {
104
+
root.classList.add('dark');
105
+
}
106
+
}
107
+
if ( response.uiStyles !== 'unset' ) {
108
+
document.body.style.cssText = response;
109
+
}
110
+
});
111
+
96
112
const root = DOMListFactory.root = document.querySelector(':root');
97
113
if ( vAPI.webextFlavor.soup.has('mobile') ) {
98
114
root.classList.add('mobile');
@@ -105,13 +121,6 @@ DOMListFactory.nodeFromSelector = function(selector) {
105
121
if ( window.matchMedia('(prefers-color-scheme: dark)').matches ) {
106
122
root.classList.add('dark');
107
123
}
108
-
109
-
// https://github.com/uBlockOrigin/uBlock-issues/issues/1044
110
-
// Offer the possibility to bypass uBO's default styling
111
-
vAPI.messaging.send('uDom', { what: 'uiStyles' }).then(response => {
112
-
if ( typeof response !== 'string' || response === 'unset' ) { return; }
113
-
document.body.style.cssText = response;
114
-
});
115
124
}
116
125
117
126
/******************************************************************************/
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4