MCPcopy Create free account
hub / github.com/WhiteSevs/TamperMonkeyScript / execMenu

Function execMenu

script-components/components/src/setting/panel.ts:598–627  ·  view source on GitHub ↗

* 自动判断菜单是否启用,如果启用,执行回调,如果不启用,执行卸载函数 * * 但是只有`once=true`时才会监听值改变并触发`callback`,如果已执行`callback`后再通过开关改为false时,这时候是不会执行卸载函数的 * @param key 判断的键,如果是字符串列表,那么它们的判断处理方式是与关系 * @param callback 回调 * @param isReverse 逆反判断菜单启用,默认false * @param once 是否是只执行一次,默认false

(
    key: string | string[],
    callback: (option: ExecMenuCallBackOption<T>) => PanelMenuExecMenuResult,
    isReverse: boolean = false,
    once: boolean = false
  )

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

includesMethod · 0.80
callbackFunction · 0.70
getValueMethod · 0.65
warnMethod · 0.45

Tested by

no test coverage detected