Add Material UI 3 component library (#3606)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: JellyBrick <shlee1503@naver.com>
This commit is contained in:
Angelos Bouklis
2025-10-11 00:11:38 +03:00
committed by GitHub
parent cbc0077690
commit 9b8daac28c
13 changed files with 890 additions and 242 deletions

View File

@ -1,5 +1,9 @@
import i18next from 'i18next';
import { setTheme } from 'mdui/functions/setTheme.js';
import 'mdui/mdui.css';
import 'mdui';
import { startingPages } from './providers/extracted-data';
import { setupSongInfo } from './providers/song-info-front';
import {
@ -25,6 +29,8 @@ import type { QueueResponse } from '@/types/youtube-music-desktop-internal';
import type { YouTubeMusicAppElement } from '@/types/youtube-music-app-element';
import type { SearchBoxElement } from '@/types/search-box-element';
setTheme('dark');
let api: (Element & YoutubePlayer) | null = null;
let isPluginLoaded = false;
let isApiLoaded = false;
@ -388,10 +394,14 @@ async function onApiLoaded() {
const style = document.createElement('style');
style.textContent = `
ytmusic-player-bar[is-mweb-player-bar-modernization-enabled] .middle-controls-buttons.ytmusic-player-bar, #like-button-renderer {
display: ${likeButtonsOptions === 'hide' ? 'none' : 'inherit'} !important;
display: ${
likeButtonsOptions === 'hide' ? 'none' : 'inherit'
} !important;
}
ytmusic-player-bar[is-mweb-player-bar-modernization-enabled] .middle-controls.ytmusic-player-bar {
justify-content: ${likeButtonsOptions === 'hide' ? 'flex-start' : 'space-between'} !important;
justify-content: ${
likeButtonsOptions === 'hide' ? 'flex-start' : 'space-between'
} !important;
}`;
document.head.appendChild(style);