diff options
author | 2021-10-14 09:32:20 +0200 | |
---|---|---|
committer | 2021-10-14 13:02:20 +0530 | |
commit | 52211095aab71f8b59b093b19ae34c222be9f390 (patch) | |
tree | 28f24a9be5ee5577667cdd396fb3fc64fc861e65 /src/webview/contextMenu.js | |
parent | chore: convert class components to functional (#2065) (diff) | |
download | ferdium-app-52211095aab71f8b59b093b19ae34c222be9f390.tar.gz ferdium-app-52211095aab71f8b59b093b19ae34c222be9f390.tar.zst ferdium-app-52211095aab71f8b59b093b19ae34c222be9f390.zip |
chore: convert various JS to TS (#2062)
Diffstat (limited to 'src/webview/contextMenu.js')
-rw-r--r-- | src/webview/contextMenu.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/webview/contextMenu.js b/src/webview/contextMenu.js deleted file mode 100644 index 567a2d470..000000000 --- a/src/webview/contextMenu.js +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | import { getCurrentWebContents } from '@electron/remote'; | ||
2 | import ContextMenuBuilder from './contextMenuBuilder'; | ||
3 | |||
4 | const webContents = getCurrentWebContents(); | ||
5 | |||
6 | export default async function setupContextMenu(isSpellcheckEnabled, getDefaultSpellcheckerLanguage, getSpellcheckerLanguage, getSearchEngine, getClipboardNotifications) { | ||
7 | const contextMenuBuilder = new ContextMenuBuilder( | ||
8 | webContents, | ||
9 | ); | ||
10 | |||
11 | webContents.on('context-menu', (e, props) => { | ||
12 | // TODO?: e.preventDefault(); | ||
13 | contextMenuBuilder.showPopupMenu( | ||
14 | { ...props, searchEngine: getSearchEngine(), clipboardNotifications: getClipboardNotifications() }, | ||
15 | isSpellcheckEnabled(), | ||
16 | getDefaultSpellcheckerLanguage(), | ||
17 | getSpellcheckerLanguage(), | ||
18 | ); | ||
19 | }); | ||
20 | } | ||