electron-debug
Advanced tools
Comparing version 0.3.1 to 0.3.2
20
index.js
'use strict'; | ||
const app = require('app'); | ||
const globalShortcut = require('global-shortcut'); | ||
const BrowserWindow = require('browser-window'); | ||
const localShortcut = require('electron-localshortcut'); | ||
const isOSX = process.platform === 'darwin'; | ||
@@ -52,9 +52,11 @@ | ||
app.on('browser-window-focus', (e, win) => { | ||
globalShortcut.register(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools); | ||
globalShortcut.register('F12', devTools); | ||
app.on('ready', () => { | ||
localShortcut.register(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools); | ||
localShortcut.register('F12', devTools); | ||
globalShortcut.register('CmdOrCtrl+R', refresh); | ||
globalShortcut.register('F5', refresh); | ||
localShortcut.register('CmdOrCtrl+R', refresh); | ||
localShortcut.register('F5', refresh); | ||
}); | ||
app.on('browser-window-focus', (e, win) => { | ||
installDebugContextMenu(win); | ||
@@ -64,10 +66,4 @@ }); | ||
app.on('browser-window-blur', (e, win) => { | ||
globalShortcut.unregister(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I'); | ||
globalShortcut.unregister('F12'); | ||
globalShortcut.unregister('CmdOrCtrl+R'); | ||
globalShortcut.unregister('F5'); | ||
uninstallDebugContextMenu(win); | ||
}); | ||
}; |
{ | ||
"name": "electron-debug", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Adds useful debug features to your Electron app", | ||
@@ -40,3 +40,6 @@ "license": "MIT", | ||
] | ||
}, | ||
"dependencies": { | ||
"electron-localshortcut": "^0.3.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5551
1
82
+ Addedelectron-localshortcut@0.3.2(transitive)