MCPcopy
hub / github.com/darkreader/darkreader / applyStyleSheet

Function applyStyleSheet

src/ui/stylesheet-editor/components/body.tsx:30–37  ·  view source on GitHub ↗
(css: string)

Source from the content-addressed store, hash-verified

28 }
29
30 function applyStyleSheet(css: string) {
31 if (custom) {
32 custom.theme = {...custom.theme, ...{stylesheet: css}};
33 actions.changeSettings({customThemes: data.settings.customThemes});
34 } else {
35 actions.setTheme({stylesheet: css});
36 }
37 }
38
39 function showDialog() {
40 context.store.isDialogVisible = true;

Callers 2

resetFunction · 0.85
applyFunction · 0.85

Calls 2

changeSettingsMethod · 0.65
setThemeMethod · 0.65

Tested by

no test coverage detected