MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / append

Method append

src/pkg/utils/hookManager.ts:5–8  ·  view source on GitHub ↗
(...fns: ((...args: any) => any)[])

Source from the content-addressed store, hash-verified

3 // 存储卸载时调用的钩子函数;unhook 后置为 null
4 private unhooks: (() => void)[] | null = [];
5 public append(...fns: ((...args: any) => any)[]) {
6 // 已经 unhook 的情况下保持幂等,直接忽略追加
7 this.unhooks?.push(...fns);
8 }
9 public readonly unhook = () => {
10 // 已经 unhook 过则保持幂等
11 this.isMounted = false;

Callers 15

AppProviderFunction · 0.95
SettingFunction · 0.95
useScriptDataManagementFunction · 0.95
useScriptListFunction · 0.95
AppFunction · 0.95
gm_xhr.jsFile · 0.80
inject-into.jsFile · 0.80
hFunction · 0.80
gm_xhr_test.jsFile · 0.80
hFunction · 0.80
readMethod · 0.80

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected