diff --git a/client/src/modules/reactcomponents.js b/client/src/modules/reactcomponents.js index cf755f27..f79844b0 100644 --- a/client/src/modules/reactcomponents.js +++ b/client/src/modules/reactcomponents.js @@ -261,7 +261,7 @@ export class ReactAutoPatcher { while (!window.webpackJsonp || !WebpackModules.getModuleByName('React')) await new Promise(resolve => setTimeout(resolve, 10)); return 1; } - static async patchem() { + static patchem() { this.patchMessage(); this.patchMessageGroup(); this.patchChannelMember(); @@ -290,7 +290,7 @@ export class ReactAutoPatcher { static async patchMessageGroup() { ReactComponents.setName('MessageGroup', this.MessageGroup.filter); - this.MessageGroup.component = await ReactComponents.getComponent('MessageGroup'); + this.MessageGroup.component = await ReactComponents.getComponent('MessageGroup', true, { selector: '.message-group' }); this.MessageGroup.component.on('render', ({ component, retVal, p }) => { const authorid = component.props.messages[0].author.id; retVal.props['data-author-id'] = authorid; diff --git a/core/src/main.js b/core/src/main.js index f85f9095..2f40dff7 100644 --- a/core/src/main.js +++ b/core/src/main.js @@ -150,7 +150,7 @@ class BetterDiscord { //this.windowUtils.webContents.on('did-finish-load', e => this.injectScripts(true)); this.windowUtils.events('did-get-response-details', () => this.ignite(this.windowUtils.window)); - this.windowUtils.events('did-get-response-details', e => this.injectScripts(true)); + this.windowUtils.events('did-finish-load', e => this.injectScripts(true)); this.windowUtils.events('did-navigate-in-page', (event, url, isMainFrame) => { this.windowUtils.send('did-navigate-in-page', { event, url, isMainFrame });