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

Function appendRule

src/inject/dynamic-theme/index.ts:129–138  ·  view source on GitHub ↗
(selectors: string[], filter: string | null)

Source from the content-addressed store, hash-verified

127 const rules: string[] = [];
128
129 const appendRule = (selectors: string[], filter: string | null) => {
130 if (!filter || selectors.length === 0) {
131 return;
132 }
133 rules.push([
134 `${selectors.join(', ')} {`,
135 ` filter: ${filter} !important;`,
136 '}',
137 ].join('\n'));
138 };
139
140 const appendCounterInversion = (selectors: string[]) => {
141 if (theme!.mode === 0 || selectors.length === 0) {

Callers 1

setInversionStyleValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected