Go back to did-finish-load
This commit is contained in:
parent
bcc856bc6b
commit
e73ac58ff3
|
@ -261,7 +261,7 @@ export class ReactAutoPatcher {
|
||||||
while (!window.webpackJsonp || !WebpackModules.getModuleByName('React')) await new Promise(resolve => setTimeout(resolve, 10));
|
while (!window.webpackJsonp || !WebpackModules.getModuleByName('React')) await new Promise(resolve => setTimeout(resolve, 10));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
static async patchem() {
|
static patchem() {
|
||||||
this.patchMessage();
|
this.patchMessage();
|
||||||
this.patchMessageGroup();
|
this.patchMessageGroup();
|
||||||
this.patchChannelMember();
|
this.patchChannelMember();
|
||||||
|
@ -290,7 +290,7 @@ export class ReactAutoPatcher {
|
||||||
|
|
||||||
static async patchMessageGroup() {
|
static async patchMessageGroup() {
|
||||||
ReactComponents.setName('MessageGroup', this.MessageGroup.filter);
|
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 }) => {
|
this.MessageGroup.component.on('render', ({ component, retVal, p }) => {
|
||||||
const authorid = component.props.messages[0].author.id;
|
const authorid = component.props.messages[0].author.id;
|
||||||
retVal.props['data-author-id'] = authorid;
|
retVal.props['data-author-id'] = authorid;
|
||||||
|
|
|
@ -150,7 +150,7 @@ class BetterDiscord {
|
||||||
//this.windowUtils.webContents.on('did-finish-load', e => this.injectScripts(true));
|
//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', () => 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.events('did-navigate-in-page', (event, url, isMainFrame) => {
|
||||||
this.windowUtils.send('did-navigate-in-page', { event, url, isMainFrame });
|
this.windowUtils.send('did-navigate-in-page', { event, url, isMainFrame });
|
||||||
|
|
Loading…
Reference in New Issue