
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
electron-application-menu-template
Advanced tools
As far as I can tell, you cannot delete a menu item from existing application menu (You can add new ones though). You cannot change the click handling function either (You can change it, but it won't take effect).
So what could you do if you would like to delete an menu item or overwrite the click handling function? You need to build a new application menu from scratch. This project provide you with a template so that you can build an application menu quickly.
The template returned should generate application menu identical (almost) to the default one provided by an Electron app.
yarn add electron-application-menu-template
import {newTemplate} from 'electron-application-menu-template';
const template = newTemplate();
// Optional: make some modifications to the template
const fileMenu = template.find(item => item.label === 'File')!;
(fileMenu.submenu! as MenuItemConstructorOptions[]).unshift(
{
label: 'Open',
accelerator: 'CmdOrCtrl+O',
async click() {
// open a file here
},
},
{
type: 'separator',
}
);
app.whenReady().then(() => {
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
});
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.

Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.

Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.