MCPcopy
hub / github.com/chavyleung/scripts / getUserCfgs

Function getUserCfgs

chavy.box.js:579–599  ·  view source on GitHub ↗

* 获取用户配置

()

Source from the content-addressed store, hash-verified

577 * 获取用户配置
578 */
579function getUserCfgs() {
580 const defcfgs = {
581 gist_cache_key: [],
582
583 favapps: [],
584 appsubs: [],
585 viewkeys: [],
586 isPinedSearchBar: true,
587 httpapi: 'examplekey@127.0.0.1:6166',
588 http_backend: ''
589 }
590 const usercfgs = Object.assign(defcfgs, $.getjson($.KEY_usercfgs, {}))
591
592 // 处理异常数据:删除所有为 null 的订阅
593 if (usercfgs.appsubs.includes(null)) {
594 usercfgs.appsubs = usercfgs.appsubs.filter((sub) => sub)
595 $.setjson(usercfgs, $.KEY_usercfgs)
596 }
597
598 return usercfgs
599}
600
601/**
602 * 获取`应用订阅`缓存

Callers 6

getBoxDataFunction · 0.70
apiUpdateFunction · 0.70
apiAddAppSubFunction · 0.70
apiDeleteAppSubFunction · 0.70
reloadAppSubCachesFunction · 0.70
upgradeUserDataFunction · 0.70

Calls 2

getjsonMethod · 0.45
setjsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…