mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +00:00
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:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user