Skip to content

Commit 73f14e5

Browse files
Fix Library removed for Premium users
As by now, the code removes the last child of the YT's buttons sidebar. It's good for non-premium users but affects premium users, as it removes the "Library" button. This small fix targets the 4th child (usually the Upgrade button location) instead of last child. A bad move/practice, but does its job and remove the Upgrade button while not removing the Library one.
1 parent 2f2e64a commit 73f14e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

preload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function onApiLoaded() {
187187
// Remove upgrade button
188188
if (config.get('options.removeUpgradeButton')) {
189189
const styles = document.createElement('style');
190-
styles.innerHTML = `ytmusic-guide-section-renderer #items ytmusic-guide-entry-renderer:last-child {
190+
styles.innerHTML = `ytmusic-guide-section-renderer #items ytmusic-guide-entry-renderer:nth-child(4) {
191191
display: none;
192192
}`;
193193
document.head.appendChild(styles);

0 commit comments

Comments
 (0)