mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
use css instead of js
This commit is contained in:
@ -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", () => {
|
||||
|
||||
@ -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%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user