added a custom menu and enabled the menu by default

This commit is contained in:
2019-11-03 20:22:59 +01:00
parent f8aa97c15e
commit 94ed652619
8 changed files with 149 additions and 14 deletions

View File

@@ -19,6 +19,14 @@ function refreshSettings() {
menuBar.checked = store.get(settings.menuBar);
}
/**
* Open an url in the default browsers
*/
window.openExternal = function(url) {
const { shell } = require("electron");
shell.openExternal(url);
};
/**
* hide the settings window
*/
@@ -58,6 +66,10 @@ window.addEventListener("DOMContentLoaded", () => {
refreshSettings();
});
ipcRenderer.on("goToTab", (event, tab) => {
document.getElementById(tab).click();
});
notifications = get("notifications");
playBackControl = get("playBackControl");
api = get("apiCheckbox");