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

Function exec

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

* 执行菜单 * * @param queryKey 判断的键,如果是字符串列表,那么它们的判断处理方式是与关系 * @param callback 执行的回调函数 * @param checkExec 判断是否执行回调 * * (默认)如果想要每个菜单是`与`关系,即每个菜单都判断为开启,那么就判断它们的值&就行 * * 如果想要任意菜单存在true再执行,那么判断它们的值|就行 * * + 返回值都为`true`,执行回调,如果回调返回了 元素,该元素会在监听到值改变时被移除掉 * + 返回值有一个为`false

(
    queryKey: string | string[] | (() => string | string[]),
    callback: (option: ExecMenuCallBackOption<T>) => PanelMenuExecMenuResult,
    checkExec?: (
      /** 键名列表 */
      keyList: string[]
    ) => boolean,
    once: boolean = true
  )

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

parseIPv4Method · 0.85
parseIPv6Method · 0.85
isWindowsDriveLetterMethod · 0.85
constructorMethod · 0.85

Calls 11

valueChangeCallbackFunction · 0.85
findMethod · 0.80
stringifyMethod · 0.80
forEachMethod · 0.80
getValueMethod · 0.65
setMethod · 0.65
hasMethod · 0.45
warnMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected