diff options
Diffstat (limited to 'src/webview')
-rw-r--r-- | src/webview/contextMenuBuilder.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/webview/contextMenuBuilder.js b/src/webview/contextMenuBuilder.js index 126fa4086..8c39e6d04 100644 --- a/src/webview/contextMenuBuilder.js +++ b/src/webview/contextMenuBuilder.js | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | import { clipboard, ipcRenderer, nativeImage } from 'electron'; | 9 | import { clipboard, ipcRenderer, nativeImage } from 'electron'; |
10 | import { Menu, MenuItem } from '@electron/remote'; | 10 | import { Menu, MenuItem } from '@electron/remote'; |
11 | import { shortcutKey, isMac } from '../environment'; | 11 | import { cmdOrCtrlShortcutKey, isMac } from '../environment'; |
12 | 12 | ||
13 | import { SEARCH_ENGINE_NAMES, SEARCH_ENGINE_URLS } from '../config'; | 13 | import { SEARCH_ENGINE_NAMES, SEARCH_ENGINE_URLS } from '../config'; |
14 | import { openExternalUrl } from '../helpers/url-helpers'; | 14 | import { openExternalUrl } from '../helpers/url-helpers'; |
@@ -375,7 +375,7 @@ module.exports = class ContextMenuBuilder { | |||
375 | const webContents = this.getWebContents(); | 375 | const webContents = this.getWebContents(); |
376 | menu.append(new MenuItem({ | 376 | menu.append(new MenuItem({ |
377 | label: this.stringTable.cut(), | 377 | label: this.stringTable.cut(), |
378 | accelerator: `${shortcutKey()}+X`, | 378 | accelerator: `${cmdOrCtrlShortcutKey()}+X`, |
379 | enabled: menuInfo.editFlags.canCut, | 379 | enabled: menuInfo.editFlags.canCut, |
380 | click: () => webContents.cut(), | 380 | click: () => webContents.cut(), |
381 | })); | 381 | })); |
@@ -390,7 +390,7 @@ module.exports = class ContextMenuBuilder { | |||
390 | const webContents = this.getWebContents(); | 390 | const webContents = this.getWebContents(); |
391 | menu.append(new MenuItem({ | 391 | menu.append(new MenuItem({ |
392 | label: this.stringTable.copy(), | 392 | label: this.stringTable.copy(), |
393 | accelerator: `${shortcutKey()}+C`, | 393 | accelerator: `${cmdOrCtrlShortcutKey()}+C`, |
394 | enabled: menuInfo.editFlags.canCopy, | 394 | enabled: menuInfo.editFlags.canCopy, |
395 | click: () => webContents.copy(), | 395 | click: () => webContents.copy(), |
396 | })); | 396 | })); |
@@ -405,7 +405,7 @@ module.exports = class ContextMenuBuilder { | |||
405 | const webContents = this.getWebContents(); | 405 | const webContents = this.getWebContents(); |
406 | menu.append(new MenuItem({ | 406 | menu.append(new MenuItem({ |
407 | label: this.stringTable.paste(), | 407 | label: this.stringTable.paste(), |
408 | accelerator: `${shortcutKey()}+V`, | 408 | accelerator: `${cmdOrCtrlShortcutKey()}+V`, |
409 | enabled: menuInfo.editFlags.canPaste, | 409 | enabled: menuInfo.editFlags.canPaste, |
410 | click: () => webContents.paste(), | 410 | click: () => webContents.paste(), |
411 | })); | 411 | })); |
@@ -423,7 +423,7 @@ module.exports = class ContextMenuBuilder { | |||
423 | menu.append( | 423 | menu.append( |
424 | new MenuItem({ | 424 | new MenuItem({ |
425 | label: this.stringTable.pasteAndMatchStyle(), | 425 | label: this.stringTable.pasteAndMatchStyle(), |
426 | accelerator: `${shortcutKey()}+Shift+V`, | 426 | accelerator: `${cmdOrCtrlShortcutKey()}+Shift+V`, |
427 | click: () => webContents.pasteAndMatchStyle(), | 427 | click: () => webContents.pasteAndMatchStyle(), |
428 | }), | 428 | }), |
429 | ); | 429 | ); |
@@ -489,7 +489,7 @@ module.exports = class ContextMenuBuilder { | |||
489 | const webContents = this.getWebContents(); | 489 | const webContents = this.getWebContents(); |
490 | menu.append(new MenuItem({ | 490 | menu.append(new MenuItem({ |
491 | label: this.stringTable.goBack(), | 491 | label: this.stringTable.goBack(), |
492 | accelerator: `${shortcutKey()}+left`, | 492 | accelerator: `${cmdOrCtrlShortcutKey()}+left`, |
493 | enabled: webContents.canGoBack(), | 493 | enabled: webContents.canGoBack(), |
494 | click: () => webContents.goBack(), | 494 | click: () => webContents.goBack(), |
495 | })); | 495 | })); |
@@ -504,7 +504,7 @@ module.exports = class ContextMenuBuilder { | |||
504 | const webContents = this.getWebContents(); | 504 | const webContents = this.getWebContents(); |
505 | menu.append(new MenuItem({ | 505 | menu.append(new MenuItem({ |
506 | label: this.stringTable.goForward(), | 506 | label: this.stringTable.goForward(), |
507 | accelerator: `${shortcutKey()}+right`, | 507 | accelerator: `${cmdOrCtrlShortcutKey()}+right`, |
508 | enabled: webContents.canGoForward(), | 508 | enabled: webContents.canGoForward(), |
509 | click: () => webContents.goForward(), | 509 | click: () => webContents.goForward(), |
510 | })); | 510 | })); |
@@ -535,7 +535,7 @@ module.exports = class ContextMenuBuilder { | |||
535 | const baseURL = new URL(menuInfo.pageURL); | 535 | const baseURL = new URL(menuInfo.pageURL); |
536 | menu.append(new MenuItem({ | 536 | menu.append(new MenuItem({ |
537 | label: this.stringTable.goToHomePage(), | 537 | label: this.stringTable.goToHomePage(), |
538 | accelerator: `${shortcutKey()}+Home`, | 538 | accelerator: `${cmdOrCtrlShortcutKey()}+Home`, |
539 | enabled: true, | 539 | enabled: true, |
540 | click: () => { | 540 | click: () => { |
541 | // webContents.loadURL(baseURL.origin); | 541 | // webContents.loadURL(baseURL.origin); |