Updated Creating Plugins (markdown)
parent
0ec0042169
commit
04784e5e9e
|
@ -110,6 +110,36 @@ The [ReactDOM](https://reactjs.org/docs/react-dom.html) module being used inside
|
|||
|
||||
***
|
||||
|
||||
#### `Plugins`
|
||||
An instance of [AddonAPI](#addonapi) to access plugins.
|
||||
|
||||
***
|
||||
|
||||
#### `Plugins`
|
||||
An instance of [AddonAPI](#addonapi) to access themes.
|
||||
|
||||
***
|
||||
|
||||
#### `settings`
|
||||
Gives access to BBD's internal settings object and is therefore subject to change.
|
||||
|
||||
***
|
||||
|
||||
#### `emotes`
|
||||
Gives access to BBD's internal emotes object and is therefore subject to change.
|
||||
|
||||
***
|
||||
|
||||
#### `screenWidth`
|
||||
Yields the total active width of the application.
|
||||
|
||||
***
|
||||
|
||||
#### `screenHeight`
|
||||
Yields the total active height of the application.
|
||||
|
||||
***
|
||||
|
||||
## Methods
|
||||
|
||||
#### `alert(title, content)`
|
||||
|
@ -394,6 +424,73 @@ Removes some previously linked JS by [`linkJS`](#linkjsid-url).
|
|||
|
||||
***
|
||||
|
||||
# AddonAPI
|
||||
|
||||
The following functions are available as a part of each `AddonAPI` object from `BdApi`.
|
||||
|
||||
## Properties
|
||||
|
||||
## Methods
|
||||
|
||||
#### `isEnabled(name)`
|
||||
Checks if the given addon is currently enabled.
|
||||
|
||||
|Parameter|Type|Description|
|
||||
|-|-|:-|
|
||||
|`name`|string|The name/identifier of the addon.|
|
||||
|
||||
**@Returns** `{Boolean}` - indicates if the addon is enabled.
|
||||
|
||||
***
|
||||
|
||||
#### `enable(name)`
|
||||
Enables the given addon.
|
||||
|
||||
|Parameter|Type|Description|
|
||||
|-|-|:-|
|
||||
|`name`|string|The name/identifier of the addon.|
|
||||
|
||||
***
|
||||
|
||||
#### `disable(name)`
|
||||
Disables the given addon.
|
||||
|
||||
|Parameter|Type|Description|
|
||||
|-|-|:-|
|
||||
|`name`|string|The name/identifier of the addon.|
|
||||
|
||||
***
|
||||
|
||||
#### `toggle(name)`
|
||||
Toggle the enablement the given addon.
|
||||
|
||||
|Parameter|Type|Description|
|
||||
|-|-|:-|
|
||||
|`name`|string|The name/identifier of the addon.|
|
||||
|
||||
***
|
||||
|
||||
#### `get(name)`
|
||||
Gets the "instance" of the given addon.
|
||||
|
||||
|Parameter|Type|Description|
|
||||
|-|-|:-|
|
||||
|`name`|string|The name/identifier of the addon.|
|
||||
|
||||
**@Returns** `{Object}` - For plugins, this is the plugin instance, for themes this is the meta + css.
|
||||
|
||||
***
|
||||
|
||||
#### `getAll()`
|
||||
Gets all the "instances" of addon type.
|
||||
|
||||
|Parameter|Type|Description|
|
||||
|-|-|:-|
|
||||
|
||||
**@Returns** `{Array<Object>}` - An array matching the output of [get](#getname-1).
|
||||
|
||||
***
|
||||
|
||||
## Custom Types
|
||||
|
||||
#### Callback: CancelPatch
|
||||
|
|
Loading…
Reference in New Issue