diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config.js | 1 | ||||
-rw-r--r-- | src/index.js | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/config.js b/src/config.js index 62bbaac12..e6bd83e06 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -171,6 +171,7 @@ export const FILE_SYSTEM_SETTINGS_TYPES = [ | |||
171 | export const LOCAL_SERVER = 'You are using Ferdi without a server'; | 171 | export const LOCAL_SERVER = 'You are using Ferdi without a server'; |
172 | export const SERVER_NOT_LOADED = 'Ferdi::SERVER_NOT_LOADED'; | 172 | export const SERVER_NOT_LOADED = 'Ferdi::SERVER_NOT_LOADED'; |
173 | 173 | ||
174 | // TODO: This seems to be duplicated between here and 'index.js' | ||
174 | // Set app directory before loading user modules | 175 | // Set app directory before loading user modules |
175 | if (process.env.FERDI_APPDATA_DIR != null) { | 176 | if (process.env.FERDI_APPDATA_DIR != null) { |
176 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); | 177 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); |
diff --git a/src/index.js b/src/index.js index 0fac386df..9c0506f53 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -11,6 +11,7 @@ import path from 'path'; | |||
11 | import windowStateKeeper from 'electron-window-state'; | 11 | import windowStateKeeper from 'electron-window-state'; |
12 | import { enforceMacOSAppLocation } from 'electron-util'; | 12 | import { enforceMacOSAppLocation } from 'electron-util'; |
13 | 13 | ||
14 | // TODO: This seems to be duplicated between here and 'config.js' | ||
14 | // Set app directory before loading user modules | 15 | // Set app directory before loading user modules |
15 | if (process.env.FERDI_APPDATA_DIR != null) { | 16 | if (process.env.FERDI_APPDATA_DIR != null) { |
16 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); | 17 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); |
@@ -65,10 +66,6 @@ app.allowRendererProcessReuse = false; | |||
65 | debug('Set userAgent to ', userAgent()); | 66 | debug('Set userAgent to ', userAgent()); |
66 | app.userAgentFallback = userAgent(); | 67 | app.userAgentFallback = userAgent(); |
67 | 68 | ||
68 | // Globally set useragent to fix user agent override in service workers | ||
69 | debug('Set userAgent to ', userAgent()); | ||
70 | app.userAgentFallback = userAgent(); | ||
71 | |||
72 | // Keep a global reference of the window object, if you don't, the window will | 69 | // Keep a global reference of the window object, if you don't, the window will |
73 | // be closed automatically when the JavaScript object is garbage collected. | 70 | // be closed automatically when the JavaScript object is garbage collected. |
74 | let mainWindow; | 71 | let mainWindow; |