diff --git a/Dribbblish/dribbblish.js b/Dribbblish/dribbblish.js index b5d059f..691a229 100644 --- a/Dribbblish/dribbblish.js +++ b/Dribbblish/dribbblish.js @@ -34,6 +34,13 @@ function waitForElement(els, func, timeout = 100) { } } +// Avoid clipping playlists at the bottom of scroll node +waitForElement([".main-rootlist-wrapper"], () => { + const mainRootlist = document.querySelector(".main-rootlist-wrapper"); + const playListItems = document.getElementsByClassName("main-rootlist-rootlistItemLink") + mainRootlist.style.height = `${playListItems.length * 56}px`; +}); + waitForElement([ `ul[tabindex="0"]`, `ul[tabindex="0"] .GlueDropTarget--playlists.GlueDropTarget--folders` @@ -59,7 +66,7 @@ waitForElement([ img.classList.add("playlist-picture"); link.prepend(img); } - img.src = base64 || "/images/tracklist-row-song-fallback.svg"; + img.src = base64 || "https://cdn.jsdelivr.net/gh/spicetify/spicetify-themes@master/Dribbblish/images/tracklist-row-song-fallback.svg"; continue; } @@ -74,7 +81,7 @@ waitForElement([ img.classList.add("playlist-picture"); link.prepend(img); } - img.src = meta.picture || "/images/tracklist-row-song-fallback.svg"; + img.src = meta.picture || "https://cdn.jsdelivr.net/gh/spicetify/spicetify-themes@master/Dribbblish/images/tracklist-row-song-fallback.svg"; }); } } diff --git a/Dribbblish/images/tracklist-row-song-fallback.svg b/Dribbblish/images/tracklist-row-song-fallback.svg new file mode 100644 index 0000000..40980a7 --- /dev/null +++ b/Dribbblish/images/tracklist-row-song-fallback.svg @@ -0,0 +1 @@ +Playlist Icon \ No newline at end of file diff --git a/Dribbblish/user.css b/Dribbblish/user.css index 7ad49e8..0ee9810 100644 --- a/Dribbblish/user.css +++ b/Dribbblish/user.css @@ -503,6 +503,12 @@ img.playlist-picture { border-radius: 50%; } +img.playlist-picture[src$=".svg"] { + width: 24px; + height: 24px; + border-radius: 0; +} + .main-rootlist-rootlistItem a span { margin-left: 24px; }