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

Function createLeadingRule

src/generators/css-filter.ts:142–149  ·  view source on GitHub ↗
(filterRoot: string, filterValue: string)

Source from the content-addressed store, hash-verified

140}
141
142function createLeadingRule(filterRoot: string, filterValue: string): string {
143 return [
144 `${filterRoot} {`,
145 ` -webkit-filter: ${filterValue} !important;`,
146 ` filter: ${filterValue} !important;`,
147 '}',
148 ].join('\n');
149}
150
151function joinSelectors(selectors: string[]): string {
152 return selectors.map((s) => s.replace(/\,$/, '')).join(',\n');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected