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

Function appendCounterInversion

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

Source from the content-addressed store, hash-verified

138 };
139
140 const appendCounterInversion = (selectors: string[]) => {
141 if (theme!.mode === 0 || selectors.length === 0) {
142 return;
143 }
144 rules.push([
145 `${selectors.join(', ')} {`,
146 ` color: black !important;`,
147 '}',
148 `${selectors.map((s) => `${s} > *`).join(', ')} {`,
149 ` filter: invert(100%) hue-rotate(180deg) !important;`,
150 '}',
151 ].join('\n'));
152 };
153
154 const appendInversionCancellation = (selectors: string[]) => {
155 if (theme!.mode === 0 || selectors.length === 0) {

Callers 1

setInversionStyleValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected