MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / initConfig

Function initConfig

src/background/sync/base.js:94–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92}
93
94function initConfig() {
95 function get(key, def) {
96 const keys = normalizeKeys(key);
97 keys.unshift('sync');
98 return getOption(keys) ?? def;
99 }
100 function set(key, value) {
101 const keys = normalizeKeys(key);
102 keys.unshift('sync');
103 setOption(keys, value);
104 }
105 function init() {
106 let config = getOption('sync');
107 if (!config || !config.services) {
108 config = {
109 services: {},
110 };
111 set([], config);
112 }
113 }
114 init();
115 return { get, set };
116}
117function serviceConfig(name) {
118 function getKeys(key) {
119 const keys = normalizeKeys(key);

Callers 1

initializeFunction · 0.85

Calls 1

initFunction · 0.70

Tested by

no test coverage detected