From e73ac58ff39bd7f57000a9acbb78305dbbfef827 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 14 Mar 2018 09:25:48 +0200 Subject: [PATCH] Go back to did-finish-load --- client/src/modules/reactcomponents.js | 4 ++-- core/src/main.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 });