mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-19 14:12:07 +00:00
use css instead of js
This commit is contained in:
@ -16,13 +16,6 @@ module.exports = (options) => {
|
|||||||
bar.updateTitle(" ");
|
bar.updateTitle(" ");
|
||||||
document.title = "Youtube Music";
|
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 = () => {
|
const toggleMenu = () => {
|
||||||
if (visible()) {
|
if (visible()) {
|
||||||
bar.updateMenu(null);
|
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("toggleMenu", toggleMenu);
|
||||||
|
|
||||||
ipcRenderer.on("refreshMenu", () => {
|
ipcRenderer.on("refreshMenu", () => {
|
||||||
|
|||||||
@ -80,3 +80,12 @@ yt-page-navigation-progress,
|
|||||||
.cet-menubar-menu-container .cet-action-item {
|
.cet-menubar-menu-container .cet-action-item {
|
||||||
background-color: inherit
|
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