2022-04-05 15:10:12 -08:00
|
|
|
const { app, protocol } = require('electron');
|
|
|
|
const path = require('path');
|
2020-05-11 18:00:33 -07:00
|
|
|
|
2022-08-09 23:18:15 +02:00
|
|
|
app.commandLine.appendSwitch('disable-features', 'AutoExpandDetailsElement');
|
|
|
|
app.commandLine.appendSwitch('allow-pre-commit-input')
|
|
|
|
|
2021-02-01 11:43:26 -08:00
|
|
|
app.on('window-all-closed', e => e.preventDefault());
|
2022-04-05 15:10:12 -08:00
|
|
|
|
|
|
|
app.whenReady().then(() => {
|
|
|
|
protocol.registerFileProtocol('vscode-file', (request, callback) => {
|
|
|
|
const url = request.url.substring('vscode-file'.length + 3);
|
|
|
|
callback({ path: path.join(__dirname, 'assets', url) });
|
|
|
|
});
|
|
|
|
});
|