use css instead of js

This commit is contained in:
Araxeus
2023-01-22 19:25:29 +02:00
parent 236034a1f9
commit 70361afbaf
2 changed files with 10 additions and 8 deletions

View File

@ -16,13 +16,6 @@ module.exports = (options) => {
bar.updateTitle(" ");
document.title = "Youtube Music";
const icon = $('.cet-window-icon');
icon.style.webkitAppRegion = 'no-drag';
icon.firstChild.style.webkitUserDrag = 'none';
icon.firstChild.style.filter = 'invert(50%)';
const toggleMenu = () => {
if (visible()) {
bar.updateMenu(null);
@ -31,7 +24,7 @@ module.exports = (options) => {
}
};
icon.addEventListener('click', toggleMenu);
$('.cet-window-icon').addEventListener('click', toggleMenu);
ipcRenderer.on("toggleMenu", toggleMenu);
ipcRenderer.on("refreshMenu", () => {

View File

@ -80,3 +80,12 @@ yt-page-navigation-progress,
.cet-menubar-menu-container .cet-action-item {
background-color: inherit
}
.cet-window-icon {
-webkit-app-region: no-drag;
}
.cet-window-icon img {
-webkit-user-drag: none;
filter: invert(50%);
}