Global Patcher Api
GL.patcher
Section titled “GL.patcher”Methods
Section titled “Methods”after()
Section titled “after()”after(
id,object,method,callback): () =>void
Runs a callback after a function on an object has been run
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
object | any |
method | string |
callback | (thisVal, args, returnVal) => any |
Returns
Section titled “Returns”Function
A function to remove the patch
Returns
Section titled “Returns”void
before()
Section titled “before()”before(
id,object,method,callback): () =>void
Runs a callback before a function on an object has been run. Return true from the callback to prevent the function from running
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
object | any |
method | string |
callback | (thisVal, args) => boolean | void |
Returns
Section titled “Returns”Function
A function to remove the patch
Returns
Section titled “Returns”void
instead()
Section titled “instead()”instead(
id,object,method,callback): () =>void
Runs a function instead of a function on an object
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
object | any |
method | string |
callback | (thisVal, args) => void |
Returns
Section titled “Returns”Function
A function to remove the patch
Returns
Section titled “Returns”void
unpatchAll()
Section titled “unpatchAll()”unpatchAll(
id):void
Removes all patches with a given id
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”void