我买了一台新的macbook,现在我正在努力让我的应用程序在64位mac上运行。
但是,我还没有能够删除默认的菜单。
是否通过app.js将我的应用程序名称从电子更改为电子内的其他东西,这样我就看不到Finder中的电子(恢复到屏幕截图以更好地理解)吗?是否有任何方法可以删除编辑、查看窗口和帮助菜单?

package.json
{
"name": "hello",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "electron ."
},
"author": "",
"license": "ISC",
"devDependencies": {
"electron-prebuilt": "^0.33.0"
}
}app.js
var app = require("app"),
BrowserWindow = require("browser-window");
app.on("ready", function() {
var mainWindow = new BrowserWindow({
toolbar: false,
"skip-taskbar": true,
"auto-hide-menu-bar": true,
width: 800,
height: 600
});
mainWindow.loadUrl("file://" + __dirname + "/index.html");
mainWindow.setMenuBarVisibility(false);
mainWindow.setAutoHideMenuBar(true);
mainWindow.openDevTools();
});index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello</title>
</head>
<body>
Hello world!
</body>
</html>发布于 2015-09-20 18:14:40
名称电子在Info.plist文件中的Electron.app中,将其更改为您想要的。
https://stackoverflow.com/questions/32637368
复制相似问题