Daksh777 / SpotifyNoPremium

A cross-platform Spicetify theme which declutters Spotify stock UI and removes all ads.
913 stars 67 forks source link

[Question] How to remove "Upgrade to Premium button" #8

Closed 54m4d closed 3 years ago

54m4d commented 3 years ago

Hello Daksh

I'm looking for a way to get rid of Upgrade to Premium in the profile drop-down menu without using spicetify with a custom theme.

Do you happen to know which line in xpui.css to edit?

I don't know CSS, that is why i'm asking for your help here.

Windows 10, 1.1.62.583.gdac868ed-a

Thanks!

Daksh777 commented 3 years ago

Hey @fosam

I haven't checked xpui.css so that I can tell which line to edit, it's a very large file and it's difficult to find that element. However, if you already use a custom Spicetify theme, you can add this to the user.css file of your custom theme, and it will remove that item from the drop-down menu:

.upgrade-button, button[data-menu-item="upgrade-account"], .main-contextMenu-menuItem a[href="https://www.spotify.com/premium/"], button[id="upgradeAccount"] {
  display: none !important;
}
54m4d commented 3 years ago

Thank you.

I will try it and let you know

54m4d commented 3 years ago

I added your css code to a custom theme and it did the job.

However, i'm wondering which files do get replaced when we apply with Spicetify? does Spicetify copy the content of user.css and puts it in the default xpui.css of Spotify at %userprofile%\AppData\Roaming\Spotify?

Daksh777 commented 3 years ago

You are correct. The user.css gets copied to %AppData%\Roaming\Spotify\Apps\xpui image

54m4d commented 3 years ago

Thanks!

Though i wish there was a method to remove the Upgrade to Premium in the original xpui.css without needing Spicetify as this would be useful for users who don't use custom themes/Spicetify.

I tried to add your css code directly under the original xpui.css just to see if it would work, but unfortunately it did not. but anyway this is much better than nothing.

Daksh777 commented 3 years ago

I'm pretty sure there is a way to do it but it must be very tedious and it's just better to apply a theme after every update than going through multiple CSS files to change that one thing. The auto-install script makes it even easier.