Skip to content

Commit

Permalink
Open feedback forms in default browser for ease of use
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStarich committed Mar 1, 2020
1 parent f3ebd62 commit 764190f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ function main() {
mainWindow = null;
});

mainWindow.webContents.on('new-window', (_, __, ___, ____, options) => {
mainWindow.webContents.on('new-window', (e, urlString, ___, ____, options) => {
const url = new URL(urlString)
if (['github.com', 'forms.gle'].includes(url.hostname)) {
e.preventDefault()
shell.openExternal(url.toString())
return
}

const [x, y] = mainWindow.getPosition()
const offset = 20
Object.assign(options, {
Expand Down

0 comments on commit 764190f

Please sign in to comment.