mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-13 09:30:53 +00:00
Add-Ons Loader System (#606)
Implements an Add-on Loader so that other add-ons, such as the FFZ Add-on Pack, can be loaded directly by FFZ without requiring the user to install multiple extensions into their browser.
This commit is contained in:
parent
d9f252ee4e
commit
a305d03b2c
20 changed files with 716 additions and 11 deletions
20
src/utilities/addon.js
Normal file
20
src/utilities/addon.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import Module from 'utilities/module';
|
||||
|
||||
export class Addon extends Module {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
this.inject('i18n');
|
||||
this.inject('settings');
|
||||
}
|
||||
|
||||
static register(id, info) {
|
||||
const ffz = FrankerFaceZ.get();
|
||||
ffz.register(`addon.${id}`, this);
|
||||
|
||||
if ( info ) {
|
||||
info.id = id;
|
||||
ffz.addons.addAddon(info);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue