From 5db5a73495bf8f06c7a9c7eb04dc4c4efdfa448e Mon Sep 17 00:00:00 2001 From: Cenk Alti Date: Mon, 14 Sep 2020 22:41:00 +0300 Subject: [PATCH] override default window title coming from html page --- src/main/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index 9e52278..abd7329 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -150,7 +150,7 @@ function onAppReady () { } case exitCodeAuthenticationError: { isLoginWindowOpen = true - const window = new BrowserWindow() + const window = new BrowserWindow({ title: 'Login to put.io' }) window.removeMenu() var gotToken = false window.on('close', async () => { @@ -164,6 +164,9 @@ function onAppReady () { gotToken ? startApp() : quitApp() } }) + window.on('page-title-updated', (event) => { + event.preventDefault() + }) window.webContents.on('will-redirect', async (event, url) => { if (url.startsWith('http://localhost')) { event.preventDefault()