mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-02 02:05:11 +00:00
fix: devtools message
This commit is contained in:
parent
e5e339234a
commit
20b3a90777
1 changed files with 6 additions and 4 deletions
|
@ -124,16 +124,18 @@ if (!gotSingleInstanceLock) {
|
||||||
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
await installDevtools();
|
await installDevtools();
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
rendererWindow = createWindow(appState);
|
||||||
|
tray = createTray(rendererWindow);
|
||||||
|
|
||||||
|
if (!isDev) {
|
||||||
rendererWindow.webContents.on('devtools-opened', () => {
|
rendererWindow.webContents.on('devtools-opened', () => {
|
||||||
// Send a message to the renderer process so we can log a security warning
|
// Send a message to the renderer process so we can log a security warning
|
||||||
rendererWindow.webContents.send('devtools-is-opened');
|
rendererWindow.webContents.send('devtools-is-opened');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
rendererWindow = createWindow(appState);
|
|
||||||
tray = createTray(rendererWindow);
|
|
||||||
|
|
||||||
// HACK: patch webrequest to fix devtools incompatibility with electron 2.x.
|
// HACK: patch webrequest to fix devtools incompatibility with electron 2.x.
|
||||||
// See https://github.com/electron/electron/issues/13008#issuecomment-400261941
|
// See https://github.com/electron/electron/issues/13008#issuecomment-400261941
|
||||||
session.defaultSession.webRequest.onBeforeRequest({}, (details, callback) => {
|
session.defaultSession.webRequest.onBeforeRequest({}, (details, callback) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue