MCPcopy Index your code
hub / github.com/darkreader/darkreader / appendInversionCancellation

Function appendInversionCancellation

src/inject/dynamic-theme/index.ts:154–167  ·  view source on GitHub ↗
(selectors: string[])

Source from the content-addressed store, hash-verified

152 };
153
154 const appendInversionCancellation = (selectors: string[]) => {
155 if (theme!.mode === 0 || selectors.length === 0) {
156 return;
157 }
158 rules.push([
159 `${selectors.join(', ')} {`,
160 ` filter: none !important;`,
161 ` color: var(--darkreader-neutral-text) !important;`,
162 '}',
163 `${selectors.map((s) => `${s} > *`).join(', ')} {`,
164 ` filter: none !important;`,
165 '}',
166 ].join('\n'));
167 };
168
169 if ((fixes && Array.isArray(fixes.invert) && fixes.invert.length > 0) || filterSelectors.invert.size > 0) {
170 const extraInversionSelectors = [...filterSelectors.invert]

Callers 1

setInversionStyleValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected