From b106c35c0389af3a61825f86ff4a171cada03004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=97=D0=BB=20=D0=93=D1=80=D0=B8?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=27=D1=94=D0=B2?= Date: Thu, 19 Jun 2025 04:54:20 +0300 Subject: [PATCH] Do not automatically open devtools Remove the behavior of automatically opening developer tools when launched with --dev command line switch. As --hide-devtools switch is now unused, remove it as well. --- electron/src/config.ts | 1 - electron/src/index.ts | 4 ---- 2 files changed, 5 deletions(-) diff --git a/electron/src/config.ts b/electron/src/config.ts index a131f8d4..aae058e9 100644 --- a/electron/src/config.ts +++ b/electron/src/config.ts @@ -18,6 +18,5 @@ export const pageUrl = app.isPackaged export const switches = { dev: app.commandLine.hasSwitch("dev"), - hideDevtools: app.commandLine.hasSwitch("hide-devtools"), safeMode: app.commandLine.hasSwitch("safe-mode"), }; diff --git a/electron/src/index.ts b/electron/src/index.ts index 6dbb3388..396d9cc9 100644 --- a/electron/src/index.ts +++ b/electron/src/index.ts @@ -47,10 +47,6 @@ function createWindow() { window.on("ready-to-show", () => { window.show(); - - if (switches.dev && !switches.hideDevtools) { - window.webContents.openDevTools(); - } }); ipc.install(window);