Skip to content

Commit

Permalink
Vencord + Disable asar
Browse files Browse the repository at this point in the history
  • Loading branch information
aiko-chan-ai committed Apr 4, 2023
1 parent 3c266cc commit d4f1245
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 3 additions & 1 deletion electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ async function createWindow() {
return shell.openExternal(url);
});

await session.defaultSession.loadExtension(path.resolve(__dirname, 'Vencord'));
const path_ = path.join(__dirname, 'Vencord');
win.setTitle(APP_NAME + ' Loading Vencord from ' + path_ + '...');
await session.defaultSession.loadExtension(path_);
log.info('Vencord-Web Extension loaded, version: ' + VencordVersion);

win.loadURL(`https://localhost:${port}`);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
}
],
"icon": "DiscordBotClient.png"
}
},
"asar": false
},
"scripts": {
"start": "echo \"Error: no start script specified\" && exit 1",
Expand Down
16 changes: 7 additions & 9 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,18 @@ async function start(port, log_, win) {
);
}
if (!Object.keys(scriptTarget).length) {
win.setTitle(APP_NAME + ' Loading assets...');
await Promise.all(
patchList.map(async (script) => {
/*
for (const script of patchList) {
win.setTitle(APP_NAME + ` Patch ${script}.js...`);
/*
scriptTarget[script] = fs.readFileSync(
`./src/${script}.js`,
'utf8',
);
*/
scriptTarget[script] = await getData(
`https://raw.githubusercontent.com/aiko-chan-ai/DiscordBotClient/185832/src/${script}.js`,
);
}),
);
scriptTarget[script] = await getData(
`https://raw.githubusercontent.com/aiko-chan-ai/DiscordBotClient/185832/src/${script}.js`,
);
}
}
if (!html || Object.values(scriptTarget).some(v => !v)) {
dialog.showErrorBox(
Expand Down

0 comments on commit d4f1245

Please sign in to comment.