diff options
author | 2022-01-27 00:17:22 +0100 | |
---|---|---|
committer | 2022-02-08 21:43:17 +0100 | |
commit | 9546dc2aa39ab096ccc723786e718a739d0bdaf9 (patch) | |
tree | 9c3afc6155cc59f6dd1235397230aaa15a5f8cec /packages/service-preload/src | |
parent | refactor: Apply shared store patches in batches (diff) | |
download | sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.tar.gz sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.tar.zst sophie-9546dc2aa39ab096ccc723786e718a739d0bdaf9.zip |
refactor: Coding conventions
Make sure that files have a default import with the same name as the
file whenever possible to reduce surprise.
Also shuffles around some file names for better legibility.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/service-preload/src')
-rw-r--r-- | packages/service-preload/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/service-preload/src/index.ts b/packages/service-preload/src/index.ts index 8b6630a..5383f42 100644 --- a/packages/service-preload/src/index.ts +++ b/packages/service-preload/src/index.ts | |||
@@ -18,7 +18,7 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import { ServiceToMainIpcMessage, webSource } from '@sophie/service-shared'; | 21 | import { ServiceToMainIpcMessage, WebSource } from '@sophie/service-shared'; |
22 | import { ipcRenderer, webFrame } from 'electron'; | 22 | import { ipcRenderer, webFrame } from 'electron'; |
23 | 23 | ||
24 | if (webFrame.parent === null) { | 24 | if (webFrame.parent === null) { |
@@ -52,7 +52,7 @@ async function fetchAndExecuteInjectScript(): Promise<void> { | |||
52 | const apiExposedResponse: unknown = await ipcRenderer.invoke( | 52 | const apiExposedResponse: unknown = await ipcRenderer.invoke( |
53 | ServiceToMainIpcMessage.ApiExposedInMainWorld, | 53 | ServiceToMainIpcMessage.ApiExposedInMainWorld, |
54 | ); | 54 | ); |
55 | const injectSource = webSource.parse(apiExposedResponse); | 55 | const injectSource = WebSource.parse(apiExposedResponse); |
56 | // Isolated world 0 is the main world. | 56 | // Isolated world 0 is the main world. |
57 | await webFrame.executeJavaScriptInIsolatedWorld(0, [injectSource]); | 57 | await webFrame.executeJavaScriptInIsolatedWorld(0, [injectSource]); |
58 | } | 58 | } |