replugged
replugged copied to clipboard
feat: prevent executing original function multiple times
Changes the instead patch logic to accept a function as return value from callback. So that it can race condition functions like send message get executed only once
Code Example:
import { Injector, common, webpack } from "replugged";
const injector = new Injector();
export async function start() {
injector.after(common.messages, "sendMessage", async (_, origFunc) => {
await Promise.resolve();
return origFunc;
});
}
export function stop() {
injector.uninjectAll();
}
Deploy Preview for replugged-docs failed.
| Name | Link |
|---|---|
| Latest commit | f131e7377eac3664ac0c1dbe2c8a8f7efb73a45e |
| Latest deploy log | https://app.netlify.com/projects/replugged-docs/deploys/68a47c37fd63a80008337f7d |