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

Function getCSSURLValue

src/inject/dynamic-theme/css-rules.ts:148–150  ·  view source on GitHub ↗
(cssURL: string)

Source from the content-addressed store, hash-verified

146// beforehand, otherwise `.` will fail matching the content within the url, as it
147// doesn't match any linebreaks.
148export function getCSSURLValue(cssURL: string): string {
149 return cssURL.trim().replace(/[\n\r\\]+/g, '').replace(/^url\((.*)\)$/, '$1').trim().replace(/^"(.*)"$/, '$1').replace(/^'(.*)'$/, '$1').replace(/(?:\\(.))/g, '$1');
150}
151
152export function getCSSBaseBath(url: string): string {
153 const cssURL = parseURL(url);

Callers 3

getURLModifierFunction · 0.90
getCSSImportURLFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected