mirror of
https://github.com/EndPwnArchive/endpwn3.git
synced 2024-08-15 00:23:30 +00:00
please work this time and dont break other things
This commit is contained in:
parent
a8aca55ed5
commit
ed27067fc9
1 changed files with 8 additions and 5 deletions
13
monitor.htm
13
monitor.htm
|
@ -40,17 +40,20 @@
|
|||
win.webContents.executeJavaScript(stage2);
|
||||
});
|
||||
|
||||
var preload = '';
|
||||
if (fs.existsSync(data + '/preload.js')) {
|
||||
preload = fs.readFileSync(data + '/preload.js').toString();
|
||||
}
|
||||
win.webContents.on('did-start-loading', () => {
|
||||
win.webContents.executeJavaScript(preload);
|
||||
});
|
||||
|
||||
// get the data path
|
||||
var data = electron.app.getPath('userData');
|
||||
|
||||
function load() {
|
||||
var branch = require('path').basename(data).substr(7);
|
||||
var preload = '';
|
||||
if (fs.existsSync(data + '/preload.js')) {
|
||||
preload = fs.readFileSync(data + '/preload.js').toString();
|
||||
}
|
||||
win.loadURL('https://' + (branch ? branch + '.' : '') + 'discordapp.com/channels/@me');
|
||||
win.webContents.executeJavaScript(preload);
|
||||
}
|
||||
|
||||
// dont update EPAPI if DONTUPDATE exists
|
||||
|
|
Loading…
Reference in a new issue