aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/contextMenuBuilder.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/contextMenuBuilder.ts')
-rw-r--r--src/webview/contextMenuBuilder.ts13
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
10import { clipboard, ipcRenderer, nativeImage, WebContents } from 'electron';
11import { Menu, MenuItem } from '@electron/remote'; 10import { Menu, MenuItem } from '@electron/remote';
11import {
12 type WebContents,
13 clipboard,
14 ipcRenderer,
15 nativeImage,
16} from 'electron';
12import { cmdOrCtrlShortcutKey, isMac } from '../environment'; 17import { cmdOrCtrlShortcutKey, isMac } from '../environment';
13 18
14import { 19import {
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';
22import { openExternalUrl } from '../helpers/url-helpers'; 27import { openExternalUrl } from '../helpers/url-helpers';
23import IContextMenuParams from '../models/IContextMenuParams'; 28import type IContextMenuParams from '../models/IContextMenuParams';
24 29
25function matchesWord(string: string) { 30function matchesWord(string: string) {
26 const regex = 31 const regex =