Skip to content

Commit

Permalink
Only show debug menus when using --debug param
Browse files Browse the repository at this point in the history
  • Loading branch information
tympanix committed Sep 3, 2016
1 parent dd6e8a1 commit d730e15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion scripts/components/menuMac.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ angular.module('torrentApp').factory("menuMac", ['electron', '$rootScope', '$bit
submenu: [
{
label: 'Reload',
visible: electron.program.debug,
accelerator: 'CmdOrCtrl+R',
click(item, focusedWindow) {
if (focusedWindow) focusedWindow.reload();
Expand All @@ -128,7 +129,8 @@ angular.module('torrentApp').factory("menuMac", ['electron', '$rootScope', '$bit
},
{
label: 'Toggle Developer Tools',
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
visible: electron.program.debug,
accelerator: 'Ctrl+Shift+I',
click(item, focusedWindow) {
if (focusedWindow)
focusedWindow.webContents.toggleDevTools();
Expand Down
4 changes: 3 additions & 1 deletion scripts/components/menuWin.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ angular.module('torrentApp').factory("menuWin", ['electron', '$rootScope', '$bit
submenu: [
{
label: 'Reload',
visible: electron.program.debug,
accelerator: 'CmdOrCtrl+R',
click(item, focusedWindow) {
if (focusedWindow) focusedWindow.reload();
Expand All @@ -95,7 +96,8 @@ angular.module('torrentApp').factory("menuWin", ['electron', '$rootScope', '$bit
},
{
label: 'Toggle Developer Tools',
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
visible: electron.program.debug,
accelerator: 'Alt+Command+I',
click(item, focusedWindow) {
if (focusedWindow)
focusedWindow.webContents.toggleDevTools();
Expand Down

0 comments on commit d730e15

Please sign in to comment.