Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

Commit

Permalink
re-enabled websocket prop, and increased delay before trying to use w…
Browse files Browse the repository at this point in the history
…ebpack stuff

- Still can't get it to wait till webpack is definitely done, so expect it to sometimes not complete loading ED.
  • Loading branch information
MasicoreLord authored and MasicoreLord committed Feb 6, 2021
1 parent c4a2908 commit e76c017
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions dom_shit.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,10 @@ process.once('loaded', async () => {
ED.plugins = plugins;
c.log(`Plugins validated.`);

//while (!electron.webFrame.top.context.window.webpackJsonp)
//electron.webFrame.executeJavaScript(`
// preloadInfoShare.webpackJsonp = window.webpackJsonp;
//`);
await c.sleep(100); // wait until this is loaded in order to use it for modules
//while (electron.webFrame.top.context.window.webpackJsonp === 'undefined')
await c.sleep(250); // wait until this is loaded in order to use it for modules

//ED.webSocket = window._ws;
ED.webSocket = window._ws;

/* Add helper functions that make plugins easy to create */
window.req = electron.webFrame.top.context.window.webpackJsonp.push([[], {
Expand Down Expand Up @@ -193,7 +190,7 @@ process.once('loaded', async () => {
}
}
catch (err) {
c.error('Failed to load BD plugins');
c.error(`Failed to load BD plugins support: ${err}\n${err.stack}`);
}
}

Expand Down

0 comments on commit e76c017

Please sign in to comment.