stuff
This commit is contained in:
parent
c17dc6f511
commit
fbb4eb7ffc
|
@ -1087,7 +1087,8 @@
|
|||
originalMethodName: modulefunction,
|
||||
callOriginalMethod: _ => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)
|
||||
};
|
||||
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded && module.BDFDBpatch[modulefunction]) {
|
||||
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded && module.BDFDBpatch[modulefunction] && !module.BDFDBpatch[modulefunction].triggered) {
|
||||
module.BDFDBpatch[modulefunction].triggered = true;
|
||||
if (!BDFDB.ObjectUtils.isEmpty(module.BDFDBpatch[modulefunction].before)) for (let id in BDFDB.ObjectUtils.sort(module.BDFDBpatch[modulefunction].before)) {
|
||||
BDFDB.TimeUtils.suppress(module.BDFDBpatch[modulefunction].before[id], `"before" callback of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`, module.BDFDBpatch[modulefunction].before[id].pluginname)(data);
|
||||
}
|
||||
|
@ -1100,6 +1101,7 @@
|
|||
let tempreturn = BDFDB.TimeUtils.suppress(module.BDFDBpatch[modulefunction].after[id], `"after" callback of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`, module.BDFDBpatch[modulefunction].after[id].pluginname)(data);
|
||||
if (tempreturn !== undefined) data.returnValue = tempreturn;
|
||||
}
|
||||
BDFDB.TimeUtils.timeout(_ => {delete module.BDFDBpatch[modulefunction].triggered;});
|
||||
}
|
||||
else BDFDB.TimeUtils.suppress(data.callOriginalMethod, `originalMethod of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`)();
|
||||
return modulefunction == "render" && data.returnValue === undefined ? null : data.returnValue;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue