Skip to content

Commit

Permalink
override default window title coming from html page
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Sep 14, 2020
1 parent 0976178 commit 5db5a73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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()
Expand Down

0 comments on commit 5db5a73

Please sign in to comment.