diff --git a/index.js b/index.js index 30626b4..073b7e6 100644 --- a/index.js +++ b/index.js @@ -103,11 +103,11 @@ module.exports = options => { addExtensionIfInstalled('devtron', name => require(name).path); addExtensionIfInstalled('electron-react-devtools', name => require(name).path); - localShortcut.register('CmdOrCtrl+Shift+C', inspectElements); - localShortcut.register(isMacOS ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools); + localShortcut.register('CommandOrControl+Shift+C', inspectElements); + localShortcut.register(isMacOS ? 'Command+Alt+I' : 'Control+Shift+I', devTools); localShortcut.register('F12', devTools); - localShortcut.register('CmdOrCtrl+R', refresh); + localShortcut.register('CommandOrControl+R', refresh); localShortcut.register('F5', refresh); })(); }; diff --git a/test.js b/test.js index 6070a76..416ce1d 100644 --- a/test.js +++ b/test.js @@ -4,13 +4,14 @@ const debug = require('.'); debug(); -function load(url) { +const load = async url => { const win = new electron.BrowserWindow({show: true}); - win.loadURL(url); - win.setMenu(null); -} + await win.loadURL(url); + win.removeMenu(); +}; -electron.app.on('ready', () => { - load(`file://${__dirname}/fixture.html`); - load('https://google.com'); -}); +(async () => { + await electron.app.whenReady(); + await load(`file://${__dirname}/fixture.html`); + await load('https://google.com'); +})();