Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 10, 2019
1 parent 658da96 commit 28e34f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})();
};
Expand Down
17 changes: 9 additions & 8 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
})();

0 comments on commit 28e34f2

Please sign in to comment.