Socket
Socket
Sign inDemoInstall

electron-debug

Package Overview
Dependencies
0
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

36

index.js

@@ -25,3 +25,3 @@ 'use strict';

const webContents = e.sender;
webContents.executeJavaScript(`require('${__dirname}/context-menu').install();`);
webContents.executeJavaScript(`window.__electron_debug.require('${__dirname}/context-menu').install();`);
}

@@ -31,3 +31,3 @@

const webContents = e.sender;
webContents.executeJavaScript(`require('${__dirname}/context-menu').uninstall();`);
webContents.executeJavaScript(`window.__electron_debug.require('${__dirname}/context-menu').uninstall();`);
}

@@ -50,23 +50,25 @@

module.exports = () => {
app.on('ready', () => {
app.on('browser-window-focus', (e, win) => {
globalShortcut.register(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools);
globalShortcut.register('F12', devTools);
app.on('browser-window-created', (e, win) => {
win.webContents.executeJavaScript('window.__electron_debug = {require: window.require};');
});
globalShortcut.register('CmdOrCtrl+R', refresh);
globalShortcut.register('F5', refresh);
app.on('browser-window-focus', (e, win) => {
globalShortcut.register(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools);
globalShortcut.register('F12', devTools);
installDebugContextMenu(win);
});
globalShortcut.register('CmdOrCtrl+R', refresh);
globalShortcut.register('F5', refresh);
app.on('browser-window-blur', (e, win) => {
globalShortcut.unregister(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I');
globalShortcut.unregister('F12');
installDebugContextMenu(win);
});
globalShortcut.unregister('CmdOrCtrl+R');
globalShortcut.unregister('F5');
app.on('browser-window-blur', (e, win) => {
globalShortcut.unregister(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I');
globalShortcut.unregister('F12');
uninstallDebugContextMenu(win);
});
globalShortcut.unregister('CmdOrCtrl+R');
globalShortcut.unregister('F5');
uninstallDebugContextMenu(win);
});
};
{
"name": "electron-debug",
"version": "0.3.0",
"version": "0.3.1",
"description": "Adds useful debug features to your Electron app",

@@ -35,7 +35,8 @@ "license": "MIT",

"xo": {
"globals": [
"atom",
"window"
"esnext": true,
"envs": [
"node",
"browser"
]
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc