Skip to content

Commit

Permalink
Add context menu
Browse files Browse the repository at this point in the history
Fixes: jitsi#380
  • Loading branch information
saghul committed Jun 4, 2020
1 parent 962470d commit a1ec905
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 5 deletions.
13 changes: 13 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {
app,
shell
} = require('electron');
const contextMenu = require('electron-context-menu');
const debug = require('electron-debug');
const isDev = require('electron-is-dev');
const { autoUpdater } = require('electron-updater');
Expand Down Expand Up @@ -34,6 +35,18 @@ app.allowRendererProcessReuse = false;
autoUpdater.logger = require('electron-log');
autoUpdater.logger.transports.file.level = 'info';

// Enable context menu so things like copy and paste work in input fields.
contextMenu({
showLookUpSelection: false,
showSearchWithGoogle: false,
showCopyImage: false,
showCopyImageAddress: false,
showSaveImage: false,
showSaveImageAs: false,
showInspectElement: true,
showServices: false
});

// Enable DevTools also on release builds to help troubleshoot issues. Don't
// show them automatically though.
debug({
Expand Down
172 changes: 167 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"@atlaskit/spinner": "9.0.13",
"@atlaskit/theme": "7.0.1",
"@atlaskit/toggle": "5.0.14",
"electron-context-menu": "2.0.1",
"electron-debug": "3.0.1",
"electron-is-dev": "1.2.0",
"electron-log": "4.1.1",
Expand Down

0 comments on commit a1ec905

Please sign in to comment.