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

Function getCSSImportURL

src/inject/dynamic-theme/style-manager.ts:579–583  ·  view source on GitHub ↗
(importDeclaration: string)

Source from the content-addressed store, hash-verified

577}
578
579function getCSSImportURL(importDeclaration: string) {
580 // substring(7) is used to remove `@import` from the string.
581 // And then use .trim() to remove the possible whitespaces.
582 return getCSSURLValue(importDeclaration.substring(7).trim().replace(/;$/, '').replace(/screen$/, ''));
583}
584
585async function loadText(url: string) {
586 if (url.startsWith('data:')) {

Callers 1

replaceCSSImportsFunction · 0.85

Calls 1

getCSSURLValueFunction · 0.90

Tested by

no test coverage detected