Merge pull request #282 from Mozartuss/master

[DribblishDynamic] Better display of the large album cover in the friends list
This commit is contained in:
Julien 2021-02-28 19:55:53 +01:00 committed by GitHub
commit ff95f72db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -178,6 +178,20 @@ waitForElement([".LeftSidebar"], (queries) => {
queries[0].append(fade);
});
var big_album_cover = document.querySelector('#now-playing-image-small');
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.type == "attributes") {
if(big_album_cover.getAttribute("data-log-context") === "cover-large"){
document.documentElement.style.setProperty('--move_buddy_list', "250px");
}else{
document.documentElement.style.setProperty('--move_buddy_list', "0px");
}
}
});
});
function getAlbumInfo(uri) {
return new Promise((resolve) => { Spicetify.CosmosAPI.resolver.get(`hm://album/v1/album-app/album/${uri}/desktop`, (err, raw) => {
resolve(!err && raw.getJSONBody())

View File

@ -11,6 +11,7 @@
--os-windows-icon-dodge: 1;
--image_url: '';
--is_light: 0;
--move_buddy_list: 0px;
}
div#popover-container::before {
@ -975,6 +976,11 @@ select {
/* Friend list */
.body-container--windows .buddy-list-iframe {
margin-top: 48px;
margin-bottom: var(--move_buddy_list);
}
.buddy-list-title h3 {
font-weight: 500;
color: var(--modspotify_secondary_fg);