Write, test, share
How to start coding
1. Create a JS/TS file
2. Create a manifest file
The ID should be unique, in case of a conflict with another extension, your plugin might not be loaded
Here we're going with Typescript.
We're setting isDevelopment
to true
in order to be able to quickly reload it when we make changes. payloadURI
in this case is the path to the plugin code, it must be an absolute path.
Obviously, before sharing the extension we'll change the payloadURI
to the URL of the file containing the code and remove isDevelopment
.
3. Quick overview
a. Permissions
Most APIs aside from basic ones require specific permissions in order to function.
The user of your plugin will need to acknowledge them before the installation.
b. Hooks
You can register hook handlers to listen to various types of events happening on the server and modify them.
For example:
Each hook handler must call e.next()
in order for the hook chain listening to that event to proceed. Not calling it will impact other plugins listening to that event.
c. UI
Hooks are great for customizing server-side behavior but you might want to provide some visual feedback to the user like showing alerts or even displaying custom content.
d. Javascript restrictions
Due to the way plugins are run under the hood, some behaviors will not work.
e. Types
Add the type definition files located here.
4. Write and test
You're good to go!
Code the extension
Test it live
Because you've set isDevelopement
to true in your manifest file, you will be able to manually reload the extension without having to restart the app. It's recommended to test your plugin with the web-app version of Seanime for convenience.
5. Share
Last updated