Hide Exposed Profile Info if Toggled

This commit is contained in:
yazninja 2022-03-23 23:50:39 +08:00 committed by GitHub
parent fa5633c501
commit 0b697b6547
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -605,7 +605,7 @@ const app = new Vue({
// Set profile name
this.chrome.userinfo = (await app.mk.api.v3.music(`/v1/me/social-profile`)).data.data[0]
// check if this.chrome.userinfo.attributes.artwork exists
if (this.chrome.userinfo.attributes.artwork) {
if (this.chrome.userinfo.attributes.artwork && !this.chrome.hideUserInfo) {
document.documentElement.style
.setProperty('--cvar-userprofileimg', `url("${this.getMediaItemArtwork(this.chrome.userinfo.attributes.artwork.url)}")`);
}