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

Function insertStyle

src/inject/dynamic-theme/style-manager.ts:231–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229 }
230
231 function insertStyle() {
232 if (inMode === 'next') {
233 if (element.nextSibling !== syncStyle) {
234 element.parentNode!.insertBefore(syncStyle!, element.nextSibling);
235 }
236 } else if (inMode === 'away') {
237 injectStyleAway(syncStyle!);
238 }
239 }
240
241 function createSyncStyle() {
242 syncStyle = element instanceof SVGStyleElement ?

Callers 2

prepareOverridesSheetFunction · 0.85
restoreFunction · 0.85

Calls 1

injectStyleAwayFunction · 0.90

Tested by

no test coverage detected