Contrary to playlists, on album pages the selector .now-playing-bar [href^="/album"] for the title would return two results: 1. The album art (picture) and 2. the title text.
On playlist pages the first result is the title text. To fix this, all elements with this selector are selected (with document.querySelectorAll) and the last result is taken as title text.
With the new Spotify version there can be more than one artist per track. These are now concatenated with a comma separated list
This PR includes following 2 fixes:
.now-playing-bar [href^="/album"]
for the title would return two results: 1. The album art (picture) and 2. the title text. On playlist pages the first result is the title text. To fix this, all elements with this selector are selected (withdocument.querySelectorAll
) and the last result is taken as title text.Before & after:
(Example album)