some clean up
This commit is contained in:
@@ -81,7 +81,6 @@ async function createWindow() {
|
||||
});
|
||||
|
||||
nativeTheme.themeSource = 'dark';
|
||||
Menu.setApplicationMenu(null);
|
||||
|
||||
// register event callbacks
|
||||
win.on("closed", function () { win = null; });
|
||||
@@ -124,7 +123,6 @@ async function createWindow() {
|
||||
* @param {Event} event
|
||||
* @returns `true` if the url is allowed, `false` otherwise
|
||||
*/
|
||||
|
||||
function validateDomain(event) {
|
||||
if (config == undefined) return true;
|
||||
|
||||
@@ -181,7 +179,7 @@ function testAndLoadUrl(testurl) {
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Init electon app
|
||||
// Init electron app
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
app.whenReady().then(() => {
|
||||
@@ -193,14 +191,16 @@ app.whenReady().then(() => {
|
||||
}
|
||||
|
||||
createWindow();
|
||||
});
|
||||
|
||||
Menu.setApplicationMenu(null);
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
app.quit()
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
app.quit()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user