Format custom menu plugin

This commit is contained in:
TC
2021-03-31 20:17:12 +02:00
parent 5671b99b7e
commit 36864b4c2f
3 changed files with 49 additions and 47 deletions

View File

@ -1,15 +1,15 @@
const customTitlebar = require('custom-electron-titlebar');
const {remote, ipcRenderer} = require('electron');
const customTitlebar = require("custom-electron-titlebar");
const { remote, ipcRenderer } = require("electron");
module.exports = () => {
const myBar = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#050505'),
itemBackgroundColor: customTitlebar.Color.fromHex('#121212')
backgroundColor: customTitlebar.Color.fromHex("#050505"),
itemBackgroundColor: customTitlebar.Color.fromHex("#121212"),
});
myBar.updateTitle(' ');
document.title = 'Youtube Music';
myBar.updateTitle(" ");
document.title = "Youtube Music";
ipcRenderer.on('updateMenu', function (event, menu) {
ipcRenderer.on("updateMenu", function (event, menu) {
if (menu) {
myBar.updateMenu(remote.Menu.getApplicationMenu());
} else {
@ -20,4 +20,4 @@ module.exports = () => {
}
}
});
};
};