mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-17 05:02:06 +00:00
Rename bar var
This commit is contained in:
@ -3,19 +3,19 @@ const { remote, ipcRenderer } = require("electron");
|
|||||||
const customTitlebar = require("custom-electron-titlebar");
|
const customTitlebar = require("custom-electron-titlebar");
|
||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
const myBar = new customTitlebar.Titlebar({
|
const bar = new customTitlebar.Titlebar({
|
||||||
backgroundColor: customTitlebar.Color.fromHex("#050505"),
|
backgroundColor: customTitlebar.Color.fromHex("#050505"),
|
||||||
itemBackgroundColor: customTitlebar.Color.fromHex("#121212"),
|
itemBackgroundColor: customTitlebar.Color.fromHex("#121212"),
|
||||||
});
|
});
|
||||||
myBar.updateTitle(" ");
|
bar.updateTitle(" ");
|
||||||
document.title = "Youtube Music";
|
document.title = "Youtube Music";
|
||||||
|
|
||||||
ipcRenderer.on("updateMenu", function (event, menu) {
|
ipcRenderer.on("updateMenu", function (event, menu) {
|
||||||
if (menu) {
|
if (menu) {
|
||||||
myBar.updateMenu(remote.Menu.getApplicationMenu());
|
bar.updateMenu(remote.Menu.getApplicationMenu());
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
myBar.updateMenu(null);
|
bar.updateMenu(null);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//will always throw type error - null isn't menu, but it works
|
//will always throw type error - null isn't menu, but it works
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user