mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 11:21:46 +00:00
Fix Remove upgrade button
For some reason now it loads later, so I just added some CSS to hide it in the DOM instead of the element
This commit is contained in:
11
preload.js
11
preload.js
@ -139,10 +139,13 @@ function onApiLoaded() {
|
|||||||
|
|
||||||
// Remove upgrade button
|
// Remove upgrade button
|
||||||
if (config.get("options.removeUpgradeButton")) {
|
if (config.get("options.removeUpgradeButton")) {
|
||||||
const upgradeButton = $('ytmusic-guide-section-renderer #items:last-child') // Last child of #items
|
const styles = document.createElement("style");
|
||||||
if (upgradeButton) {
|
styles.innerHTML = `
|
||||||
upgradeButton.style.display = "none";
|
ytmusic-guide-section-renderer #items ytmusic-guide-entry-renderer:last-child {
|
||||||
}
|
display: none;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
document.head.appendChild(styles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user