diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-11-24 13:19:47 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-11-25 17:04:12 +0100 |
| commit | d0816e181992ff1fd772d383113fc27a673adcf9 (patch) | |
| tree | b881463c84159830e1c1ce0fa12b5afa73438422 /gui/src | |
| parent | bbbdf3aee12773fc04a43e38ca92c0fa551dd370 (diff) | |
| download | mullvadvpn-d0816e181992ff1fd772d383113fc27a673adcf9.tar.xz mullvadvpn-d0816e181992ff1fd772d383113fc27a673adcf9.zip | |
Prevent spellcheck download
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/index.ts | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 32dc098818..53e281c15a 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -1,5 +1,15 @@ import { execFile } from 'child_process'; -import { app, BrowserWindow, ipcMain, Menu, nativeImage, screen, shell, Tray } from 'electron'; +import { + app, + BrowserWindow, + ipcMain, + Menu, + nativeImage, + screen, + session, + shell, + Tray, +} from 'electron'; import log from 'electron-log'; import mkdirp from 'mkdirp'; import moment from 'moment'; @@ -341,6 +351,11 @@ class ApplicationMain { } private onReady = async () => { + // There's no option that prevents Electron from fetching spellcheck dictionaries from + // Chromium's CDN and passing a non-resolving URL is the only known way to prevent it from + // fetching. https://github.com/electron/electron/issues/22995 + session.defaultSession.setSpellCheckerDictionaryDownloadURL('https://00.00/'); + this.updateCurrentLocale(); this.daemonRpc.addConnectionObserver( @@ -1395,6 +1410,7 @@ class ApplicationMain { devTools: process.env.NODE_ENV === 'development', // TODO: Remove use of remote enableRemoteModule: true, + spellcheck: false, }, }; |
