This commit is contained in:
Mirco Wittrien 2020-04-09 09:18:22 +02:00
parent b8b28a7820
commit 56187c5aa0
2 changed files with 9 additions and 3 deletions

View File

@ -1160,7 +1160,6 @@
ModalLayer: "layermodal", ModalLayer: "layermodal",
MutualGuilds: "userprofilebody", MutualGuilds: "userprofilebody",
MutualFriends: "userprofilebody", MutualFriends: "userprofilebody",
NameTag: "nametag",
Note: "usernote", Note: "usernote",
PopoutContainer: "popout", PopoutContainer: "popout",
Popouts: "popouts", Popouts: "popouts",
@ -1412,7 +1411,14 @@
if (instance) { if (instance) {
instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance; instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance;
let patchMethods = {}; let patchMethods = {};
patchMethods[patchType] = e => {return InternalBDFDB.initiateProcess(plugin, type, {instance:window != e.thisObject ? e.thisObject : {props:e.methodArguments[0]}, returnvalue:e.returnValue, methodname:e.originalMethodName, patchtypes:[patchType]})}; patchMethods[patchType] = e => {
return InternalBDFDB.initiateProcess(plugin, type, {
instance: window != e.thisObject ? e.thisObject : {props:e.methodArguments[0]},
returnvalue: e.returnValue,
methodname: e.originalMethodName,
patchtypes: [patchType]
})
};
BDFDB.ModuleUtils.patch(plugin, WebModulesData.NonPrototype.includes(name) ? instance : instance.prototype, plugin.patchedModules[patchType][type], patchMethods); BDFDB.ModuleUtils.patch(plugin, WebModulesData.NonPrototype.includes(name) ? instance : instance.prototype, plugin.patchedModules[patchType][type], patchMethods);
} }
} }

File diff suppressed because one or more lines are too long