mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
fix(renderer): fix force like buttons display logic (#2493)
This commit is contained in:
@ -237,16 +237,16 @@ async function onApiLoaded() {
|
|||||||
'options.likeButtons',
|
'options.likeButtons',
|
||||||
);
|
);
|
||||||
if (likeButtonsOptions) {
|
if (likeButtonsOptions) {
|
||||||
const likeButtons: HTMLElement | null = document.querySelector(
|
const style = document.createElement('style');
|
||||||
'ytmusic-like-button-renderer',
|
style.textContent = `
|
||||||
);
|
ytmusic-player-bar[is-mweb-player-bar-modernization-enabled] .middle-controls-buttons.ytmusic-player-bar, #like-button-renderer {
|
||||||
if (likeButtons) {
|
display: ${likeButtonsOptions === 'hide' ? 'none' : 'inherit'} !important;
|
||||||
likeButtons.style.display =
|
}
|
||||||
{
|
ytmusic-player-bar[is-mweb-player-bar-modernization-enabled] .middle-controls.ytmusic-player-bar {
|
||||||
hide: 'none',
|
justify-content: ${likeButtonsOptions === 'hide' ? 'flex-start' : 'space-between'} !important;
|
||||||
force: 'inherit',
|
}`;
|
||||||
}[likeButtonsOptions] || '';
|
|
||||||
}
|
document.head.appendChild(style);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user