XL misc on load changes
This commit is contained in:
parent
f47c064482
commit
669d4bf562
|
@ -1278,17 +1278,7 @@ var XenoLib = (() => {
|
||||||
/* NOTIFICATIONS END */
|
/* NOTIFICATIONS END */
|
||||||
|
|
||||||
global.XenoLib = XenoLib;
|
global.XenoLib = XenoLib;
|
||||||
const listener = e => {
|
let listener = DiscordConstants.NOOP;
|
||||||
if (e !== 'XenoLib') return;
|
|
||||||
XenoLib.shutdown();
|
|
||||||
BDEvents.off('plugin-unloaded', listener);
|
|
||||||
};
|
|
||||||
if (global.BDEvents) {
|
|
||||||
BDEvents.dispatch('xenolib-loaded');
|
|
||||||
BDEvents.on('plugin-unloaded', listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
XenoLib.changeName(__filename, '1XenoLib'); /* prevent user from changing libs filename */
|
|
||||||
|
|
||||||
const notifLocations = ['topLeft', 'topMiddle', 'topRight', 'bottomLeft', 'bottomMiddle', 'bottomRight'];
|
const notifLocations = ['topLeft', 'topMiddle', 'topRight', 'bottomLeft', 'bottomMiddle', 'bottomRight'];
|
||||||
const notifLocationClasses = [`${XenoLib.getClass('selected topLeft')} ${XenoLib.getClass('topLeft option')}`, `topMiddle-xenoLib ${XenoLib.getClass('topLeft option')}`, `${XenoLib.getClass('selected topRight')} ${XenoLib.getClass('topLeft option')}`, `${XenoLib.getClass('selected bottomLeft')} ${XenoLib.getClass('topLeft option')}`, `bottomMiddle-xenoLib ${XenoLib.getClass('topLeft option')}`, `${XenoLib.getClass('selected bottomRight')} ${XenoLib.getClass('topLeft option')}`];
|
const notifLocationClasses = [`${XenoLib.getClass('selected topLeft')} ${XenoLib.getClass('topLeft option')}`, `topMiddle-xenoLib ${XenoLib.getClass('topLeft option')}`, `${XenoLib.getClass('selected topRight')} ${XenoLib.getClass('topLeft option')}`, `${XenoLib.getClass('selected bottomLeft')} ${XenoLib.getClass('topLeft option')}`, `bottomMiddle-xenoLib ${XenoLib.getClass('topLeft option')}`, `${XenoLib.getClass('selected bottomRight')} ${XenoLib.getClass('topLeft option')}`];
|
||||||
|
@ -1382,6 +1372,18 @@ var XenoLib = (() => {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.settings = LibrarySettings;
|
this.settings = LibrarySettings;
|
||||||
|
listener = e => {
|
||||||
|
if (e !== 'XenoLib') return;
|
||||||
|
XenoLib.shutdown();
|
||||||
|
BDEvents.off('plugin-unloaded', listener);
|
||||||
|
};
|
||||||
|
XenoLib.changeName(__filename, '1XenoLib'); /* prevent user from changing libs filename */
|
||||||
|
}
|
||||||
|
load() {
|
||||||
|
if (global.BDEvents) {
|
||||||
|
BDEvents.dispatch('xenolib-loaded');
|
||||||
|
BDEvents.on('plugin-unloaded', listener);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
buildSetting(data) {
|
buildSetting(data) {
|
||||||
if (data.type === 'position') {
|
if (data.type === 'position') {
|
||||||
|
|
Loading…
Reference in New Issue