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

Function hookSetting

src/common/hook-setting.js:15–23  ·  view source on GitHub ↗
(key, update)

Source from the content-addressed store, hash-verified

13});
14
15export default function hookSetting(key, update) {
16 options.ready.then(() => update(options.get(key)));
17 const list = hooks[key] || (hooks[key] = []);
18 list.push(update);
19 return () => {
20 const i = list.indexOf(update);
21 if (i >= 0) list.splice(i, 1);
22 };
23}

Callers 1

hookSettingsForUIFunction · 0.85

Calls 2

updateFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected