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

Function createCSSFilterStyleSheet

src/generators/css-filter.ts:46–50  ·  view source on GitHub ↗
(config: Theme, url: string, isTopFrame: boolean, fixes: string, index: SiteFixesIndex)

Source from the content-addressed store, hash-verified

44}
45
46export default function createCSSFilterStyleSheet(config: Theme, url: string, isTopFrame: boolean, fixes: string, index: SiteFixesIndex): string {
47 const filterValue = getCSSFilterValue(config)!;
48 const reverseFilterValue = 'invert(100%) hue-rotate(180deg)';
49 return cssFilterStyleSheetTemplate('html', filterValue, reverseFilterValue, config, url, isTopFrame, fixes, index);
50}
51
52export function cssFilterStyleSheetTemplate(filterRoot: string, filterValue: string, reverseFilterValue: string, config: Theme, url: string, isTopFrame: boolean, fixes: string, index: SiteFixesIndex): string {
53 const fix = getInversionFixesFor(url, fixes, index);

Callers

nothing calls this directly

Calls 2

getCSSFilterValueFunction · 0.85

Tested by

no test coverage detected