Throw everything into _bd object

This commit is contained in:
Jiiks 2018-03-12 17:50:09 +02:00
parent 67dddf5391
commit d965e29867
1 changed files with 23 additions and 21 deletions

View File

@ -18,32 +18,34 @@ const ignoreExternal = true;
class BetterDiscord {
constructor() {
window.discordApi = DiscordApi;
window.bdu = Utils;
window.ref = Reflection;
window.rc = ReactComponents;
window.ReactComponents = ReactComponents;
window.bddb = Database;
window.bdglobals = Globals;
window.ClientIPC = ClientIPC;
window.css = CssEditor;
window.pm = PluginManager;
window.tm = ThemeManager;
window.events = Events;
window.wpm = WebpackModules;
window.bdsettings = Settings;
window.bdmodals = Modals;
window.bdlogs = Logger;
window.emotes = EmoteModule;
window.dom = DOM;
window._bd = {
DOM,
BdUI,
Modals,
Reflection,
Patcher,
Events,
CssEditor,
Globals,
ExtModuleManager,
PluginManager,
ThemeManager,
ModuleManager,
WebpackModules,
Settings,
Database,
ReactComponents,
DiscordApi,
Logger,
ClientIPC,
Utils,
EmoteModule
}
DOM.injectStyle(BdCss, 'bdmain');
this.globalReady = this.globalReady.bind(this);
Events.on('global-ready', this.globalReady);
Globals.initg();
//this.globalReady = this.globalReady.bind(this);
//this.globalReady();
}
async init() {