aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 594097288..e5f678759 100644
--- a/src/index.js
+++ b/src/index.js
@@ -37,6 +37,7 @@ import Tray from './lib/Tray';
37import Settings from './electron/Settings'; 37import Settings from './electron/Settings';
38import handleDeepLink from './electron/deepLinking'; 38import handleDeepLink from './electron/deepLinking';
39import { isPositionValid } from './electron/windowUtils'; 39import { isPositionValid } from './electron/windowUtils';
40// import askFormacOSPermissions from './electron/macOSPermissions';
40import { appId } from './package.json'; // eslint-disable-line import/no-unresolved 41import { appId } from './package.json'; // eslint-disable-line import/no-unresolved
41import './electron/exception'; 42import './electron/exception';
42 43
@@ -46,10 +47,14 @@ import {
46} from './config'; 47} from './config';
47import { asarPath } from './helpers/asar-helpers'; 48import { asarPath } from './helpers/asar-helpers';
48import { isValidExternalURL } from './helpers/url-helpers'; 49import { isValidExternalURL } from './helpers/url-helpers';
49/* eslint-enable import/first */ 50import userAgent from './helpers/userAgent-helpers';
50 51
51const debug = require('debug')('Ferdi:App'); 52const debug = require('debug')('Ferdi:App');
52 53
54// Globally set useragent to fix user agent override in service workers
55debug('Set userAgent to ', userAgent());
56app.userAgentFallback = userAgent();
57
53// Keep a global reference of the window object, if you don't, the window will 58// Keep a global reference of the window object, if you don't, the window will
54// be closed automatically when the JavaScript object is garbage collected. 59// be closed automatically when the JavaScript object is garbage collected.
55let mainWindow; 60let mainWindow;
@@ -182,6 +187,7 @@ const createWindow = () => {
182 nodeIntegration: true, 187 nodeIntegration: true,
183 webviewTag: true, 188 webviewTag: true,
184 preload: path.join(__dirname, 'sentry.js'), 189 preload: path.join(__dirname, 'sentry.js'),
190 enableRemoteModule: true,
185 }, 191 },
186 }); 192 });
187 193
@@ -291,6 +297,11 @@ const createWindow = () => {
291 } 297 }
292 }); 298 });
293 299
300 // Asking for permissions like this currently crashes Ferdi
301 // if (isMac) {
302 // askFormacOSPermissions();
303 // }
304
294 mainWindow.on('show', () => { 305 mainWindow.on('show', () => {
295 debug('Skip taskbar: true'); 306 debug('Skip taskbar: true');
296 mainWindow.setSkipTaskbar(false); 307 mainWindow.setSkipTaskbar(false);