2022-04-06 02:10:12 +03:00
|
|
|
const { app, protocol } = require('electron');
|
|
|
|
const path = require('path');
|
2020-05-12 04:00:33 +03:00
|
|
|
|
2022-08-10 00:18:15 +03:00
|
|
|
app.commandLine.appendSwitch('disable-features', 'AutoExpandDetailsElement');
|
|
|
|
app.commandLine.appendSwitch('allow-pre-commit-input')
|
|
|
|
|
2021-02-01 22:43:26 +03:00
|
|
|
app.on('window-all-closed', e => e.preventDefault());
|
2022-04-06 02:10:12 +03: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) });
|
|
|
|
});
|
|
|
|
});
|