2018-01-10 21:48:10 +01:00
|
|
|
/**
|
|
|
|
* BetterDiscord Client Core
|
|
|
|
* Copyright (c) 2015-present JsSucks - https://github.com/JsSucks
|
|
|
|
* All rights reserved.
|
|
|
|
* https://github.com/JsSucks - https://betterdiscord.net
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2018-01-19 02:37:21 +01:00
|
|
|
const { Global, Logger, Utils, PluginManager, BDIpc, WebpackModules, SocketProxy, Events } = require('./modules');
|
|
|
|
//const { UI } = require('./modules/ui/index.jsx');
|
2018-01-11 00:46:05 +01:00
|
|
|
|
2018-01-10 21:48:10 +01:00
|
|
|
class BetterDiscord {
|
|
|
|
|
|
|
|
constructor() {
|
2018-01-15 06:09:28 +01:00
|
|
|
window.bdUtils = Utils;
|
2018-01-15 12:59:45 +01:00
|
|
|
window.wpm = WebpackModules;
|
2018-01-19 02:37:21 +01:00
|
|
|
Events.on('global-ready', e => {
|
2018-01-19 03:10:10 +01:00
|
|
|
const { UI } = require('./modules/ui/vueui.js');
|
2018-01-19 02:37:21 +01:00
|
|
|
this.ui = new UI();
|
|
|
|
});
|
|
|
|
// this.UI = new UI();
|
2018-01-10 21:48:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-01-11 00:07:35 +01:00
|
|
|
if (window.BetterDiscord) {
|
2018-01-11 07:02:11 +01:00
|
|
|
Logger.log('main', 'Attempting to inject again?');
|
2018-01-11 00:07:35 +01:00
|
|
|
} else {
|
|
|
|
let bdInstance = new BetterDiscord();
|
2018-01-11 00:46:05 +01:00
|
|
|
window.BetterDiscord = {
|
|
|
|
'vendor': {
|
|
|
|
jQuery: require('jquery'),
|
|
|
|
$: require('jquery'),
|
|
|
|
moment: require('moment')
|
|
|
|
}
|
|
|
|
};
|
2018-01-11 00:07:35 +01:00
|
|
|
}
|