fix: Remove upgrade button

https://github.com/th-ch/youtube-music/pull/1206
This commit is contained in:
JellyBrick
2023-09-03 21:05:22 +09:00
parent 278618bc83
commit c0d7972da3

View File

@ -155,10 +155,11 @@ function onApiLoaded() {
// Remove upgrade button
if (config.get('options.removeUpgradeButton')) {
const upgradeButton: HTMLElement | null = $('ytmusic-pivot-bar-item-renderer[tab-id="SPunlimited"]');
if (upgradeButton) {
upgradeButton.style.display = 'none';
}
const styles = document.createElement('style');
styles.innerHTML = `ytmusic-guide-section-renderer #items ytmusic-guide-entry-renderer:last-child {
display: none;
}`;
document.head.appendChild(styles);
}
// Hide / Force show like buttons