diff --git a/index.js b/index.js index 559bd20d..fabf3312 100644 --- a/index.js +++ b/index.js @@ -93,10 +93,10 @@ function createMainWindow() { affinity: "main-window", // main window, and addition windows should work in one process ...(isTesting() ? { - // Only necessary when testing with Spectron - contextIsolation: false, - nodeIntegration: true, - } + // Only necessary when testing with Spectron + contextIsolation: false, + nodeIntegration: true, + } : undefined), }, frame: !is.macOS() && !config.plugins.isEnabled("styled-bars"), diff --git a/plugins/styled-bars/back.js b/plugins/styled-bars/back.js index 95593285..83f4570a 100644 --- a/plugins/styled-bars/back.js +++ b/plugins/styled-bars/back.js @@ -1,11 +1,10 @@ const {injectCSS} = require('../utils'); -const {Menu} = require('electron'); +const {Menu , app} = require('electron'); const path = require('path'); const electronLocalshortcut = require("electron-localshortcut"); const is = require('electron-is'); const {getAllPlugins} = require('../../plugins/utils'); const config = require('../../config'); -const { app } = require('electron') module.exports = win => { // css for custom scrollbar + disable drag area(was causing bugs) @@ -86,6 +85,7 @@ const mainMenuTemplate = win => [ checked: config.get('options.disableHardwareAcceleration'), click: item => { config.set('options.disableHardwareAcceleration', item.checked); + checkCheckbox(item); } }, { diff --git a/plugins/styled-bars/front.js b/plugins/styled-bars/front.js index 6ea48454..e4eae2c0 100644 --- a/plugins/styled-bars/front.js +++ b/plugins/styled-bars/front.js @@ -2,7 +2,6 @@ const customTitlebar = require('custom-electron-titlebar'); const {remote, ipcRenderer} = require('electron'); module.exports = () => { - //const windowProxy = window.open('https://music.youtube.com', null); const myBar = new customTitlebar.Titlebar({ backgroundColor: customTitlebar.Color.fromHex('#030303'), itemBackgroundColor: customTitlebar.Color.fromHex('#121212') @@ -11,8 +10,6 @@ module.exports = () => { document.title = 'Youtube Music'; ipcRenderer.on('updateMenu', function (event, menu) { - //let menu = Menu.buildFromTemplate(template); - //Menu.setApplicationMenu(menu); if (menu) { myBar.updateMenu(remote.Menu.getApplicationMenu()); } else { diff --git a/plugins/styled-bars/style.css b/plugins/styled-bars/style.css index da4c5c39..b629695c 100644 --- a/plugins/styled-bars/style.css +++ b/plugins/styled-bars/style.css @@ -3,6 +3,7 @@ ytmusic-nav-bar { -webkit-app-region : unset; } +/* Move navBar downwards and make it opaque */ ytmusic-app-layout { --ytmusic-nav-bar-height: 120px; } @@ -20,6 +21,7 @@ yt-page-navigation-progress, #progress.yt-page-navigation-progress { ytmusic-item-section-renderer[has-item-section-tabbed-header-renderer_] #header.ytmusic-item-section-renderer { top: 90px !important; } +/* Custom scrollbar */ ::-webkit-scrollbar { width: 12px; background-color: #030303;