mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
fix(youtube-music): fix #3296, and macOS traffic lights
This commit is contained in:
@ -80,3 +80,8 @@ html {
|
||||
ytmusic-browse-response .ytmusic-responsive-list-item-renderer {
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
/* fix fullscreen style */
|
||||
ytmusic-player[player-ui-state='FULLSCREEN'] {
|
||||
margin-top: calc(var(--menu-bar-height, 32px) * -1) !important;
|
||||
}
|
||||
|
||||
@ -32,6 +32,18 @@ let firstDataLoaded = false;
|
||||
|
||||
registerWindowDefaultTrustedTypePolicy();
|
||||
|
||||
{
|
||||
let osType = 'Unknown';
|
||||
if (window.electronIs.osx()) {
|
||||
osType = 'Macintosh';
|
||||
} else if (window.electronIs.windows()) {
|
||||
osType = 'Windows';
|
||||
} else if (window.electronIs.linux()) {
|
||||
osType = 'Linux';
|
||||
}
|
||||
document.documentElement.setAttribute('data-os', osType);
|
||||
}
|
||||
|
||||
async function listenForApiLoad() {
|
||||
if (!isApiLoaded) {
|
||||
api = document.querySelector('#movie_player');
|
||||
|
||||
@ -79,10 +79,6 @@ tp-yt-paper-item.ytmusic-guide-entry-renderer::before {
|
||||
max-width: calc(100% - var(--ytmusic-player-page-vertical-padding) * 2);
|
||||
}
|
||||
|
||||
ytmusic-player[player-ui-state='FULLSCREEN'] {
|
||||
margin-top: calc(var(--menu-bar-height, 32px) * -1) !important;
|
||||
}
|
||||
|
||||
/* macos traffic lights fix */
|
||||
:where([data-os*='Macintosh']) ytmusic-app-layout#layout ytmusic-nav-bar {
|
||||
padding-top: var(--ytmusic-nav-bar-offset, 0);
|
||||
|
||||
Reference in New Issue
Block a user