Skip to content
This repository was archived by the owner on Apr 15, 2019. It is now read-only.

Add DevTools Keyboard Shortcut #937

Merged
merged 2 commits into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/src/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import electron from 'electron'; // eslint-disable-line import/no-extraneous-dependencies
import electronLocalshortcut from 'electron-localshortcut'; // eslint-disable-line import/no-extraneous-dependencies
import path from 'path';
import storage from 'electron-json-storage'; // eslint-disable-line import/no-extraneous-dependencies
import i18n from './i18n';
import buildMenu from './menu';


const { app, BrowserWindow, Menu, ipcMain } = electron;

let win;
Expand Down Expand Up @@ -77,6 +79,12 @@ function createWindow() {
Menu.setApplicationMenu(buildMenu(app, copyright, i18n));
win.loadURL(`file://${__dirname}/index.html`);

// Enables DevTools
win.devtools = true;
electronLocalshortcut.register(win, 'CmdOrCtrl+Shift+I', () => {
win.webContents.toggleDevTools();
});

win.on('closed', () => { win = null; });

const selectionMenu = Menu.buildFromTemplate([
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"bignumber.js": "4.0.4",
"bitcore-mnemonic": "1.2.5",
"copy-to-clipboard": "3.0.8",
"electron-localshortcut": "^2.0.2",
"flexboxgrid": "=6.3.1",
"history": "^4.7.2",
"i18next": "^9.0.0",
Expand Down