diff options
Diffstat (limited to 'src/webview/contextMenuBuilder.ts')
-rw-r--r-- | src/webview/contextMenuBuilder.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/webview/contextMenuBuilder.ts b/src/webview/contextMenuBuilder.ts index ee55fbe62..155e533e9 100644 --- a/src/webview/contextMenuBuilder.ts +++ b/src/webview/contextMenuBuilder.ts | |||
@@ -7,20 +7,25 @@ | |||
7 | * Source: https://github.com/electron-userland/electron-spellchecker/blob/master/src/context-menu-builder.js | 7 | * Source: https://github.com/electron-userland/electron-spellchecker/blob/master/src/context-menu-builder.js |
8 | */ | 8 | */ |
9 | 9 | ||
10 | import { clipboard, ipcRenderer, nativeImage, WebContents } from 'electron'; | ||
11 | import { Menu, MenuItem } from '@electron/remote'; | 10 | import { Menu, MenuItem } from '@electron/remote'; |
11 | import { | ||
12 | type WebContents, | ||
13 | clipboard, | ||
14 | ipcRenderer, | ||
15 | nativeImage, | ||
16 | } from 'electron'; | ||
12 | import { cmdOrCtrlShortcutKey, isMac } from '../environment'; | 17 | import { cmdOrCtrlShortcutKey, isMac } from '../environment'; |
13 | 18 | ||
14 | import { | 19 | import { |
20 | GOOGLE_TRANSLATOR_LANGUAGES, | ||
21 | LIBRETRANSLATE_TRANSLATOR_LANGUAGES, | ||
15 | SEARCH_ENGINE_NAMES, | 22 | SEARCH_ENGINE_NAMES, |
16 | SEARCH_ENGINE_URLS, | 23 | SEARCH_ENGINE_URLS, |
17 | GOOGLE_TRANSLATOR_LANGUAGES, | ||
18 | TRANSLATOR_ENGINE_GOOGLE, | 24 | TRANSLATOR_ENGINE_GOOGLE, |
19 | TRANSLATOR_ENGINE_LIBRETRANSLATE, | 25 | TRANSLATOR_ENGINE_LIBRETRANSLATE, |
20 | LIBRETRANSLATE_TRANSLATOR_LANGUAGES, | ||
21 | } from '../config'; | 26 | } from '../config'; |
22 | import { openExternalUrl } from '../helpers/url-helpers'; | 27 | import { openExternalUrl } from '../helpers/url-helpers'; |
23 | import IContextMenuParams from '../models/IContextMenuParams'; | 28 | import type IContextMenuParams from '../models/IContextMenuParams'; |
24 | 29 | ||
25 | function matchesWord(string: string) { | 30 | function matchesWord(string: string) { |
26 | const regex = | 31 | const regex = |