Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Commit

Permalink
default browser - dont ask
Browse files Browse the repository at this point in the history
  • Loading branch information
tborychowski committed Aug 2, 2018
1 parent ff00527 commit 5fc22c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const {app, BrowserWindow} = require('electron');
const windowStateKeeper = require('electron-window-state');
const EVENT = require('./app/services/events');
const config = require('./app/services/config');
const helper = require('./app/services/helper');
const updater = require('./app/updater/main');

@@ -54,4 +55,10 @@ app.on('window-all-closed', app.quit);
app.on('ready', createWindow);
app.on('open-url', openUrl); // opening URL in GHB

const dontAsk = config.get('defaultBrowser-dont-ask');
if (!app.isDefaultProtocolClient('http') && !dontAsk) {
app.setAsDefaultProtocolClient('http');
config.set('defaultBrowser-dont-ask', true);
}

global.appArgs = process.argv; // opening URL from CLI

0 comments on commit 5fc22c8

Please sign in to comment.