From c0d7972da3d0099fa360e594ff23097244543148 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sun, 3 Sep 2023 21:05:22 +0900 Subject: [PATCH] fix: Remove upgrade button https://github.com/th-ch/youtube-music/pull/1206 --- preload.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/preload.ts b/preload.ts index 7c2507938f..b8da3363cd 100644 --- a/preload.ts +++ b/preload.ts @@ -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