Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-debug

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-debug - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

46

index.js

@@ -7,26 +7,36 @@ 'use strict';

function devTools() {
var win = BrowserWindow.getFocusedWindow();
if (win) {
win.toggleDevTools();
}
}
function refresh() {
var win = BrowserWindow.getFocusedWindow();
if (win) {
win.reloadIgnoringCache();
}
}
module.exports = function () {
app.on('ready', function () {
globalShortcut.register(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools);
globalShortcut.register('F12', devTools);
app.on('browser-window-focus', function () {
globalShortcut.register(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I', devTools);
globalShortcut.register('F12', devTools);
globalShortcut.register('CmdOrCtrl+R', refresh);
globalShortcut.register('F5', refresh);
globalShortcut.register('CmdOrCtrl+R', refresh);
globalShortcut.register('F5', refresh);
});
function devTools() {
var win = BrowserWindow.getFocusedWindow();
app.on('browser-window-blur', function () {
globalShortcut.unregister(isOSX ? 'Cmd+Alt+I' : 'Ctrl+Shift+I');
globalShortcut.unregister('F12');
if (win) {
win.toggleDevTools();
}
}
function refresh() {
var win = BrowserWindow.getFocusedWindow();
if (win) {
win.reloadIgnoringCache();
}
}
globalShortcut.unregister('CmdOrCtrl+R');
globalShortcut.unregister('F5');
});
});
};
{
"name": "electron-debug",
"version": "0.2.0",
"version": "0.2.1",
"description": "Adds useful debug features to your Electron app",

@@ -15,2 +15,5 @@ "license": "MIT",

},
"scripts": {
"test": "xo"
},
"files": [

@@ -25,3 +28,11 @@ "index.js"

"dev"
]
],
"devDependencies": {
"xo": "*"
},
"xo": {
"globals": [
"atom"
]
}
}

@@ -37,2 +37,4 @@ # electron-debug

```js
var app = require('app');
require('electron-debug')();

@@ -43,3 +45,6 @@

app.on('ready', function () {
win = new BrowserWindow({});
win = new BrowserWindow({
width: 800,
height: 600
});
});

@@ -46,0 +51,0 @@ ```

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc